示例#1
0
func (q *termQuery) Searcher(i *indexImpl, explain bool) (search.Searcher, error) {
	field := q.FieldVal
	if q.FieldVal == "" {
		field = i.m.DefaultField
	}
	return searchers.NewTermSearcher(i.i, q.Term, field, q.BoostVal, explain)
}
示例#2
0
func (q *termQuery) Searcher(i index.IndexReader, m *IndexMapping, explain bool) (search.Searcher, error) {
	field := q.FieldVal
	if q.FieldVal == "" {
		field = m.DefaultField
	}
	return searchers.NewTermSearcher(i, q.Term, field, q.BoostVal, explain)
}