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);
 }

Reply via email to