0
0

Merge pull request #676 from steveyen/scorch

scorch avoid extra clone by using roaring.AndNot(x, y)
This commit is contained in:
Steve Yen 2017-12-19 13:52:40 -08:00 committed by GitHub
commit c0e09d8906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()