Upgrade bleve from v2.0.6 to v2.3.0 (#18132)

This commit is contained in:
Lunny Xiao 2022-01-01 16:26:27 +08:00 committed by GitHub
parent 1a4e2bfcd1
commit 25a290e320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 1283 additions and 660 deletions

View file

@ -536,13 +536,18 @@ func (i *PostingsIterator) nextDocNumAtOrAfter(atOrAfter uint64) (uint64, bool,
return 0, false, nil
}
if i.postings == nil || i.postings.postings == i.ActualBM {
if i.postings == nil || i.postings == emptyPostingsList {
// couldn't find anything
return 0, false, nil
}
if i.postings.postings == i.ActualBM {
return i.nextDocNumAtOrAfterClean(atOrAfter)
}
i.Actual.AdvanceIfNeeded(uint32(atOrAfter))
if !i.Actual.HasNext() {
if !i.Actual.HasNext() || !i.all.HasNext() {
// couldn't find anything
return 0, false, nil
}
@ -571,6 +576,10 @@ func (i *PostingsIterator) nextDocNumAtOrAfter(atOrAfter uint64) (uint64, bool,
}
}
if !i.all.HasNext() {
return 0, false, nil
}
allN = i.all.Next()
}