Class FloatPointNearestNeighbor.NearestVisitor

java.lang.Object
org.apache.lucene.sandbox.document.FloatPointNearestNeighbor.NearestVisitor
All Implemented Interfaces:
PointValues.IntersectVisitor
Enclosing class:
FloatPointNearestNeighbor

private static class FloatPointNearestNeighbor.NearestVisitor extends Object implements PointValues.IntersectVisitor
  • Field Details

    • curDocBase

      int curDocBase
    • curLiveDocs

      Bits curLiveDocs
    • topN

      final int topN
    • hitQueue

    • origin

      final float[] origin
    • dims

      private final int dims
    • bottomNearestDistanceSquared

      double bottomNearestDistanceSquared
    • bottomNearestDistanceDoc

      int bottomNearestDistanceDoc
  • Constructor Details

  • Method Details

    • visit

      public void visit(int docID)
      Description copied from interface: PointValues.IntersectVisitor
      Called for all documents in a leaf cell that's fully contained by the query. The consumer should blindly accept the docID.
      Specified by:
      visit in interface PointValues.IntersectVisitor
    • visit

      public void visit(int docID, byte[] packedValue)
      Description copied from interface: PointValues.IntersectVisitor
      Called for all documents in a leaf cell that crosses the query. The consumer should scrutinize the packedValue to decide whether to accept it. In the 1D case, values are visited in increasing order, and in the case of ties, in increasing docID order.
      Specified by:
      visit in interface PointValues.IntersectVisitor
    • updateBottomNearestDistance

      private void updateBottomNearestDistance()
    • compare

      public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue)
      Description copied from interface: PointValues.IntersectVisitor
      Called for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.
      Specified by:
      compare in interface PointValues.IntersectVisitor