0
0

Merge pull request #464 from steveyen/check-FieldDictPrefix-err

check for error when prefix searcher starts a FieldDictPrefix reader
This commit is contained in:
Marty Schoch 2016-10-12 13:36:04 +02:00 committed by GitHub
commit 4e16818656

View File

@ -30,6 +30,9 @@ type TermPrefixSearcher struct {
func NewTermPrefixSearcher(indexReader index.IndexReader, prefix string, field string, boost float64, explain bool) (*TermPrefixSearcher, error) {
// find the terms with this prefix
fieldDict, err := indexReader.FieldDictPrefix(field, []byte(prefix))
if err != nil {
return nil, err
}
// enumerate all the terms in the range
qsearchers := make([]search.Searcher, 0, 25)