Package org.apache.lucene.util

Examples of org.apache.lucene.util.FixedBitSet.flip()


    final int n = atLeast(10000);
    final FixedBitSet bits = new FixedBitSet(n);
    Random random = random();
    for (int i = 0; i < n; i++) {
      int idx = random.nextInt(n);
      bits.flip(idx, idx + 1);
    }
   
    FixedBitSet verify = bits.clone();

    ScoredDocIDs scoredDocIDs = ScoredDocIdsUtils.createScoredDocIds(bits, n);
View Full Code Here


      int doc;
      while ((doc = iter.nextDoc()) < maxDoc) {
        complement.set(doc);
      }
    }
    complement.flip(0, maxDoc);
    clearDeleted(reader, complement);

    return createScoredDocIds(complement, maxDoc);
  }
 
View Full Code Here

          bits.or(it);
        }
      }
      // this is somehow inverse, if we negate the filter, we delete all documents it matches!
      if (!negateFilter) {
        bits.flip(0, in.maxDoc());
      }

      if (in.hasDeletions()) {
        for (int i = 0; i < in.maxDoc(); i++) {
          if (in.isDeleted(i)) {
View Full Code Here

        if (it != null) {
          bits.or(it);
        }
      }
      if (negateFilter) {
        bits.flip(0, maxDoc);
      }

      if (in.hasDeletions()) {
        final Bits oldLiveDocs = in.getLiveDocs();
        assert oldLiveDocs != null;
View Full Code Here

      int doc;
      while ((doc = iter.nextDoc()) < maxDoc) {
        complement.set(doc);
      }
    }
    complement.flip(0, maxDoc);
    clearDeleted(reader, complement);

    return createScoredDocIds(complement, maxDoc);
  }
 
View Full Code Here

    final int n = atLeast(10000);
    final FixedBitSet bits = new FixedBitSet(n);
    Random random = random();
    for (int i = 0; i < n; i++) {
      int idx = random.nextInt(n);
      bits.flip(idx, idx + 1);
    }
   
    FixedBitSet verify = new FixedBitSet(bits);

    ScoredDocIDs scoredDocIDs = ScoredDocIdsUtils.createScoredDocIds(bits, n);
View Full Code Here

      int doc;
      while ((doc = iter.nextDoc()) < maxDoc) {
        complement.set(doc);
      }
    }
    complement.flip(0, maxDoc);
    clearDeleted(reader, complement);

    return createScoredDocIds(complement, maxDoc);
  }
 
View Full Code Here

    final int n = atLeast(10000);
    final FixedBitSet bits = new FixedBitSet(n);
    Random random = random();
    for (int i = 0; i < n; i++) {
      int idx = random.nextInt(n);
      bits.flip(idx, idx + 1);
    }
   
    FixedBitSet verify = new FixedBitSet(bits);

    ScoredDocIDs scoredDocIDs = ScoredDocIdsUtils.createScoredDocIds(bits, n);
View Full Code Here

    if (logic == AND) {
      result.or(getDISI(chain[index[0]], context));
      ++index[0];
    } else if (logic == ANDNOT) {
      result.or(getDISI(chain[index[0]], context));
      result.flip(0, reader.maxDoc()); // NOTE: may set bits for deleted docs.
      ++index[0];
    }
    return result;
  }
View Full Code Here

        if (it != null) {
          bits.or(it);
        }
      }
      if (negateFilter) {
        bits.flip(0, maxDoc);
      }

      if (in.hasDeletions()) {
        final Bits oldLiveDocs = in.getLiveDocs();
        assert oldLiveDocs != null;
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.