0
0
Fork 0

scorch avoid extra clone by using roaring.AndNot(x, y)

This commit is contained in:
Steve Yen 2017-12-19 13:37:04 -08:00
parent b0e4936a71
commit d0e4f85026
1 changed files with 1 additions and 2 deletions

View File

@ -72,8 +72,7 @@ func (p *PostingsList) Iterator() segment.PostingsIterator {
rv.all = p.postings.Iterator()
if p.except != nil {
allExcept := p.postings.Clone()
allExcept.AndNot(p.except)
allExcept := roaring.AndNot(p.postings, p.except)
rv.actual = allExcept.Iterator()
} else {
rv.actual = p.postings.Iterator()