mirror of
https://gitee.com/gitea/gitea
synced 2025-11-30 13:20:25 +08:00
Update to last common bleve (#3986)
This commit is contained in:
committed by
Lunny Xiao
parent
1b7cd3d0b0
commit
917b9641ec
13
vendor/github.com/blevesearch/bleve/search/searcher/search_phrase.go
generated
vendored
13
vendor/github.com/blevesearch/bleve/search/searcher/search_phrase.go
generated
vendored
@@ -226,6 +226,10 @@ type phrasePart struct {
|
||||
loc *search.Location
|
||||
}
|
||||
|
||||
func (p *phrasePart) String() string {
|
||||
return fmt.Sprintf("[%s %v]", p.term, p.loc)
|
||||
}
|
||||
|
||||
type phrasePath []*phrasePart
|
||||
|
||||
func (p phrasePath) MergeInto(in search.TermLocationMap) {
|
||||
@@ -309,6 +313,15 @@ func (s *PhraseSearcher) Advance(ctx *search.SearchContext, ID index.IndexIntern
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if s.currMust != nil {
|
||||
if s.currMust.IndexInternalID.Compare(ID) >= 0 {
|
||||
return s.Next(ctx)
|
||||
}
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user