0
0
Fork 0

fix bug when using Advance() on boolean search

showed up when nesting booleans within booleans
This commit is contained in:
Marty Schoch 2014-07-21 16:48:51 -04:00
parent 24b4348f7a
commit 1f17195e7d
1 changed files with 8 additions and 1 deletions

View File

@ -260,7 +260,14 @@ func (s *TermBooleanSearcher) Advance(ID string) (*DocumentMatch, error) {
}
}
s.currentId = ID
if s.mustSearcher != nil && s.currMust != nil {
s.currentId = s.currMust.ID
} else if s.mustSearcher == nil && s.currShould != nil {
s.currentId = s.currShould.ID
} else {
s.currentId = ""
}
return s.Next()
}