Examples of andNot()


Examples of org.apache.lucene.util.OpenBitSet.andNot()

  @Override
   public DocSet andNot(DocSet other) {
    OpenBitSet newbits = (OpenBitSet)(bits.clone());
     if (other instanceof BitDocSet) {
       newbits.andNot(((BitDocSet)other).bits);
     } else {
       DocIterator iter = other.iterator();
       while (iter.hasNext()) newbits.clear(iter.nextDoc());
     }
     return new BitDocSet(newbits);
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSet.andNot()

    return this.size() + other.size() - this.intersectionSize(other);
  }

  public DocSet andNot(DocSet other) {
    OpenBitSet newbits = (OpenBitSet)(this.getBits().clone());
    newbits.andNot(other.getBits());
    return new BitDocSet(newbits);
  }

  public int andNotSize(DocSet other) {
    return this.size() - this.intersectionSize(other);
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSet.andNot()

    iter(a2,b2);

    OpenBitSet a_and = (OpenBitSet) bs1.clone(); a_and.and(bs2);
    OpenBitSet a_or = (OpenBitSet) bs1.clone(); a_or.or(bs2);
    // OpenBitSet a_xor = (OpenBitSet)bs1.clone(); a_xor.xor(bs2);
    OpenBitSet a_andn = (OpenBitSet) bs1.clone(); a_andn.andNot(bs2);

    checkEqual(a_and, b1.intersection(b2));
    checkEqual(a_or, b1.union(b2));
    checkEqual(a_andn, b1.andNot(b2));
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSet.andNot()

    iter(a2,b2);

    OpenBitSet a_and = (OpenBitSet) bs1.clone(); a_and.and(bs2);
    OpenBitSet a_or = (OpenBitSet) bs1.clone(); a_or.or(bs2);
    // OpenBitSet a_xor = (OpenBitSet)bs1.clone(); a_xor.xor(bs2);
    OpenBitSet a_andn = (OpenBitSet) bs1.clone(); a_andn.andNot(bs2);

    checkEqual(a_and, b1.intersection(b2));
    checkEqual(a_or, b1.union(b2));
    checkEqual(a_andn, b1.andNot(b2));
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSet.andNot()

    return this.size() + other.size() - this.intersectionSize(other);
  }

  public DocSet andNot(DocSet other) {
    OpenBitSet newbits = (OpenBitSet)(this.getBits().clone());
    newbits.andNot(other.getBits());
    return new BitDocSet(newbits);
  }

  public int andNotSize(DocSet other) {
    return this.size() - this.intersectionSize(other);
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSet.andNot()

  @Override
   public DocSet andNot(DocSet other) {
    OpenBitSet newbits = (OpenBitSet)(bits.clone());
     if (other instanceof BitDocSet) {
       newbits.andNot(((BitDocSet)other).bits);
     } else {
       DocIterator iter = other.iterator();
       while (iter.hasNext()) newbits.clear(iter.nextDoc());
     }
     return new BitDocSet(newbits);
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSetDISI.andNot()

          res.flip(0, reader.maxDoc()); // NOTE: may set bits on deleted docs
        } else {
          DocIdSet dis = notFilters.get(i).getDocIdSet(reader);
          if(dis instanceof OpenBitSet) {
            // optimized case for OpenBitSets
            res.andNot((OpenBitSet) dis);
          } else {
            res.inPlaceNot(getDISI(notFilters, i, reader));
          }
        }
      }
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSetDISI.andNot()

                    res.flip(0, reader.maxDoc()); // NOTE: may set bits on deleted docs
                } else {
                    DocIdSet dis = notFilters.get(i).getDocIdSet(reader);
                    if (dis instanceof OpenBitSet) {
                        // optimized case for OpenBitSets
                        res.andNot((OpenBitSet) dis);
                    } else if (dis instanceof OpenBitDocSet) {
                        res.andNot(((OpenBitDocSet) dis).set());
                    } else {
                        res.inPlaceNot(getDISI(notFilters, i, reader));
                    }
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSetDISI.andNot()

                    DocIdSet dis = notFilters.get(i).getDocIdSet(reader);
                    if (dis instanceof OpenBitSet) {
                        // optimized case for OpenBitSets
                        res.andNot((OpenBitSet) dis);
                    } else if (dis instanceof OpenBitDocSet) {
                        res.andNot(((OpenBitDocSet) dis).set());
                    } else {
                        res.inPlaceNot(getDISI(notFilters, i, reader));
                    }
                }
            }
View Full Code Here

Examples of org.apache.solr.util.OpenBitSet.andNot()

    return this.size() + other.size() - this.intersectionSize(other);
  }

  public DocSet andNot(DocSet other) {
    OpenBitSet newbits = (OpenBitSet)(this.getBits().clone());
    newbits.andNot(other.getBits());
    return new BitDocSet(newbits);
  }

  public int andNotSize(DocSet other) {
    return this.size() - this.intersectionSize(other);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.