예제 #1
0
func (q *prefixQuery) Searcher(i index.IndexReader, m *IndexMapping, explain bool) (search.Searcher, error) {
	field := q.FieldVal
	if q.FieldVal == "" {
		field = m.DefaultField
	}
	return searchers.NewTermPrefixSearcher(i, q.Prefix, field, q.BoostVal, explain)
}
예제 #2
0
func (q *prefixQuery) Searcher(i *indexImpl, explain bool) (search.Searcher, error) {
	field := q.FieldVal
	if q.FieldVal == "" {
		field = i.m.DefaultField
	}
	return searchers.NewTermPrefixSearcher(i.i, q.Prefix, field, q.BoostVal, explain)
}