Could you open up a JIRA so we can refer to it in CHANGES.txt? It's a trivial change that I might normally put there, but the performance impact is probably non-trivial for negative queries (in main query or in filters).
-Yonik On Fri, Nov 14, 2008 at 2:04 PM, Yonik Seeley <[EMAIL PROTECTED]> wrote: > Thanks Mark, looks like it should be if (other instanceof BitDocSet). > > On Fri, Nov 14, 2008 at 1:58 PM, Mark Miller <[EMAIL PROTECTED]> wrote: >> Maybe for the future? Wondering, because it looks odd at the moment - >> OpenBitSet doesn't extend DocSet, so the if can never be true. Something >> seems odd anyway - or maybe its just waiting for future code changes... >> >> public DocSet andNot(DocSet other) { >> OpenBitSet newbits = (OpenBitSet)(bits.clone()); >> if (other instanceof OpenBitSet) { >> newbits.andNot(((BitDocSet)other).bits); >> } else { >> DocIterator iter = other.iterator(); >> while (iter.hasNext()) newbits.clear(iter.nextDoc()); >> } >> return new BitDocSet(newbits); >> } >> >