0
0
Fork 0

Merge pull request #700 from mschoch/scorch-phrase

phrase searcher don't allow advance after end
This commit is contained in:
Marty Schoch 2017-12-28 07:00:09 -08:00 committed by GitHub
commit fd91a1b4b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {