LUCENE-5608 better/more comments

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1594394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2014-05-13 21:25:24 +00:00
parent 6f92315865
commit 986275e2a8
3 changed files with 10 additions and 9 deletions

View File

@ -222,10 +222,10 @@ public abstract class AbstractVisitingPrefixTreeFilter extends AbstractPrefixTre
//Check for adjacent leaf (happens for indexed non-point shapes)
if (hasIndexedLeaves && cell.getLevel() != 0) {
//If the next indexed term just adds a leaf marker ('+') to cell,
//If the next indexed term just adds a leaf marker to cell,
// then add all of those docs
scanCell = grid.readCell(thisTerm, scanCell);
assert curVNode.cell.isPrefixOf(scanCell);
assert curVNode.cell.isPrefixOf(scanCell) : "missing leaf or descendants";
if (scanCell.getLevel() == cell.getLevel() && scanCell.isLeaf()) {
visitLeaf(scanCell);
//advance
@ -348,7 +348,6 @@ public abstract class AbstractVisitingPrefixTreeFilter extends AbstractPrefixTre
*/
protected abstract void visitScanned(Cell cell) throws IOException;
protected void preSiblings(VNode vNode) throws IOException {
}

View File

@ -48,10 +48,13 @@ import java.io.IOException;
*
* @lucene.experimental
*/
//TODO LUCENE-4869: implement faster algorithm based on filtering out false-positives of a
// minimal query buffer by looking in a DocValues cache holding a representative
// point of each disjoint component of a document's shape(s).
public class WithinPrefixTreeFilter extends AbstractVisitingPrefixTreeFilter {
//TODO LUCENE-4869: implement faster algorithm based on filtering out false-positives of a
// minimal query buffer by looking in a DocValues cache holding a representative
// point of each disjoint component of a document's shape(s).
//TODO Could the recursion in allCellsIntersectQuery() be eliminated when non-fuzzy or other
// circumstances?
private final Shape bufferedQueryShape;//if null then the whole world

View File

@ -32,7 +32,7 @@ class TreeCellIterator extends CellIterator {
// pave the way for re-using Cell & CellIterator at a given level in the future.
private final Shape shapeFilter;//possibly null
private final CellIterator[] iterStack;
private final CellIterator[] iterStack;//starts at level 1
private int stackIdx;//-1 when done
private boolean descend;
@ -40,8 +40,7 @@ class TreeCellIterator extends CellIterator {
this.shapeFilter = shapeFilter;
assert parentCell.getLevel() == 0;
iterStack = new CellIterator[detailLevel];
CellIterator nextLevelCells = parentCell.getNextLevelCells(shapeFilter);
iterStack[0] = nextLevelCells;
iterStack[0] = parentCell.getNextLevelCells(shapeFilter);
stackIdx = 0;//always points to an iter (non-null)
//note: not obvious but needed to visit the first cell before trying to descend
descend = false;