0
0
Fork 0

phrase searcher don't allow advance after end

This commit is contained in:
Marty Schoch 2017-12-27 10:20:45 -08:00
parent 7afeb1ae1d
commit 272da43c16
1 changed files with 3 additions and 0 deletions

View File

@ -319,6 +319,9 @@ func (s *PhraseSearcher) Advance(ctx *search.SearchContext, ID index.IndexIntern
}
ctx.DocumentMatchPool.Put(s.currMust)
}
if s.currMust == nil {
return nil, nil
}
var err error
s.currMust, err = s.mustSearcher.Advance(ctx, ID)
if err != nil {