Examples of BitSetIterator


Examples of org.apache.solr.util.BitSetIterator

  }
  ***/

  public DocIterator iterator() {
    return new DocIterator() {
      private final BitSetIterator iter = new BitSetIterator(bits);
      private int pos = iter.next();
      public boolean hasNext() {
        return pos>=0;
      }

      public Integer next() {
        return nextDoc();
      }

      public void remove() {
        bits.clear(pos);
      }

      public int nextDoc() {
        int old=pos;
        pos=iter.next();
        return old;
      }

      public float score() {
        return 0.0f;
View Full Code Here

Examples of org.apache.solr.util.BitSetIterator

    return bs;
  }

  public DocSet getHashDocSet(OpenBitSet bs) {
    int[] docs = new int[(int)bs.cardinality()];
    BitSetIterator iter = new BitSetIterator(bs);
    for (int i=0; i<docs.length; i++) {
      docs[i] = iter.next();
    }
    return new HashDocSet(docs,0,docs.length);
  }
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.