Package org.apache.lucene.util

Examples of org.apache.lucene.util.OpenBitSetIterator.nextDoc()


  ***/

  public DocIterator iterator() {
    return new DocIterator() {
      private final OpenBitSetIterator iter = new OpenBitSetIterator(bits);
      private int pos = iter.nextDoc();
      public boolean hasNext() {
        return pos != DocIdSetIterator.NO_MORE_DOCS;
      }

      public Integer next() {
View Full Code Here


        bits.clear(pos);
      }

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

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

  ***/

  public DocIterator iterator() {
    return new DocIterator() {
      private final OpenBitSetIterator iter = new OpenBitSetIterator(bits);
      private int pos = iter.nextDoc();
      public boolean hasNext() {
        return pos != DocIdSetIterator.NO_MORE_DOCS;
      }

      public Integer next() {
View Full Code Here

        bits.clear(pos);
      }

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

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

  public DocSet getHashDocSet(OpenBitSet bs) {
    int[] docs = new int[(int)bs.cardinality()];
    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    for (int i=0; i<docs.length; i++) {
      docs[i] = iter.nextDoc();
    }
    return new HashDocSet(docs,0,docs.length);
  }

  public DocSet getIntDocSet(OpenBitSet bs) {
View Full Code Here

  public DocSet getIntDocSet(OpenBitSet bs) {
    int[] docs = new int[(int)bs.cardinality()];
    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    for (int i=0; i<docs.length; i++) {
      docs[i] = iter.nextDoc();
    }
    return new SortedIntDocSet(docs);
  }

View Full Code Here

    int end = offset + len;

    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    // put in opposite order... DocLists are not ordered.
    for (int i=end-1; i>=offset; i--) {
      arr[i] = iter.nextDoc();
    }

    return new DocSlice(offset, len, arr, null, len*2, 100.0f);
  }

View Full Code Here

  public DocSet getHashDocSet(OpenBitSet bs) {
    int[] docs = new int[(int)bs.cardinality()];
    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    for (int i=0; i<docs.length; i++) {
      docs[i] = iter.nextDoc();
    }
    return new HashDocSet(docs,0,docs.length);
  }

  public DocSet getIntDocSet(OpenBitSet bs) {
View Full Code Here

  public DocSet getIntDocSet(OpenBitSet bs) {
    int[] docs = new int[(int)bs.cardinality()];
    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    for (int i=0; i<docs.length; i++) {
      docs[i] = iter.nextDoc();
    }
    return new SortedIntDocSet(docs);
  }

View Full Code Here

    int end = offset + len;

    OpenBitSetIterator iter = new OpenBitSetIterator(bs);
    // put in opposite order... DocLists are not ordered.
    for (int i=end-1; i>=offset; i--) {
      arr[i] = iter.nextDoc();
    }

    return new DocSlice(offset, len, arr, null, len*2, 100.0f);
  }

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.