Example usage for org.apache.lucene.util BitSetIterator nextDoc

List of usage examples for org.apache.lucene.util BitSetIterator nextDoc

Introduction

In this page you can find the example usage for org.apache.lucene.util BitSetIterator nextDoc.

Prototype

@Override
    public int nextDoc() 

Source Link

Usage

From source file:org.elasticsearch.percolator.PercolatorMatchedSlotSubFetchPhase.java

License:Apache License

static int[] buildRootDocsSlots(BitSet rootDocs) {
    int slot = 0;
    int[] rootDocsBySlot = new int[rootDocs.cardinality()];
    BitSetIterator iterator = new BitSetIterator(rootDocs, 0);
    for (int rootDocId = iterator.nextDoc(); rootDocId != NO_MORE_DOCS; rootDocId = iterator.nextDoc()) {
        rootDocsBySlot[slot++] = rootDocId;
    }/*from   w  ww .  j a  v  a2  s . co  m*/
    return rootDocsBySlot;
}