/** Get prefix & leaf docs at this cell. */ private SmallDocSet getDocs(Cell cell, Bits acceptContains) throws IOException { assert indexedCell.compareToNoLeaf(cell) == 0; //called when we've reached detailLevel. if (indexedCell.isLeaf()) {//only a leaf SmallDocSet result = collectDocs(acceptContains); nextTerm(); return result; } else { SmallDocSet docsAtPrefix = collectDocs(acceptContains); if (!nextTerm()) { return docsAtPrefix; } //collect leaf too if (indexedCell.isLeaf() && indexedCell.compareToNoLeaf(cell) == 0) { SmallDocSet docsAtLeaf = collectDocs(acceptContains); nextTerm(); return union(docsAtPrefix, docsAtLeaf); } else { return docsAtPrefix; } } }
/** Get prefix & leaf docs at this cell. */ private SmallDocSet getDocs(Cell cell, Bits acceptContains) throws IOException { assert indexedCell.compareToNoLeaf(cell) == 0; //called when we've reached detailLevel. if (indexedCell.isLeaf()) {//only a leaf SmallDocSet result = collectDocs(acceptContains); nextTerm(); return result; } else { SmallDocSet docsAtPrefix = collectDocs(acceptContains); if (!nextTerm()) { return docsAtPrefix; } //collect leaf too if (indexedCell.isLeaf() && indexedCell.compareToNoLeaf(cell) == 0) { SmallDocSet docsAtLeaf = collectDocs(acceptContains); nextTerm(); return union(docsAtPrefix, docsAtLeaf); } else { return docsAtPrefix; } } }
/** Gets docs on the leaf of the given cell, _if_ there is a leaf cell, otherwise null. */ private SmallDocSet getLeafDocs(Cell cell, Bits acceptContains) throws IOException { assert indexedCell.compareToNoLeaf(cell) == 0; //Advance past prefix if we're at a prefix; return null if no leaf if (!indexedCell.isLeaf()) { if (!nextTerm() || !indexedCell.isLeaf() || indexedCell.getLevel() != cell.getLevel()) { return null; } } SmallDocSet result = collectDocs(acceptContains); nextTerm(); return result; }
public ContainsVisitor(LeafReaderContext context) throws IOException { super(context); if (termsEnum != null) { nextTerm();//advance to first } }
/** Gets docs on the leaf of the given cell, _if_ there is a leaf cell, otherwise null. */ private SmallDocSet getLeafDocs(Cell cell, Bits acceptContains) throws IOException { assert indexedCell.compareToNoLeaf(cell) == 0; //Advance past prefix if we're at a prefix; return null if no leaf if (!indexedCell.isLeaf()) { if (!nextTerm() || !indexedCell.isLeaf() || indexedCell.getLevel() != cell.getLevel()) { return null; } } SmallDocSet result = collectDocs(acceptContains); nextTerm(); return result; }
public ContainsVisitor(LeafReaderContext context) throws IOException { super(context); if (termsEnum != null) { nextTerm();//advance to first } }