Module org.apache.lucene.core
Package org.apache.lucene.document
Class ShapeDocValues.ShapeComparator
java.lang.Object
org.apache.lucene.document.ShapeDocValues.ShapeComparator
- Enclosing class:
ShapeDocValues
Shape Comparator class provides tree traversal relation methods
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpatialQuery.EncodedRectangle
private final int
private final int
private ShapeDocValues.Reader
private final ShapeDocValues.Encoder
private final ShapeField.DecodedTriangle.TYPE
private final int
private final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
private int
private int
getMaxX()
private int
getMaxY()
private int
getMinX()
private int
getMinY()
private int
relate
(Component2D query) Computes a query component relation with the doc value shape; main entry point to the root of the binary treeprivate PointValues.Relation
relate
(Component2D queryComponent2D, boolean splitX, int pMaxX, int pMaxY, int nodeSize) recursive traversal method recurses through tree nodes to compute relation with the query componentprivate PointValues.Relation
relateComponent
(ShapeField.DecodedTriangle.TYPE type, SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double x, Component2D queryComponent2D) relates the component based on type (POINT, LINE, TRIANGLE)private PointValues.Relation
relateLine
(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D query) private PointValues.Relation
relatePoint
(SpatialQuery.EncodedRectangle bbox, int pMaxY, double ax, Component2D query) private PointValues.Relation
relateTriangle
(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D queryComponent2D) private void
private void
-
Field Details
-
dvReader
-
encoder
-
version
private final byte version -
numberOfTerms
private final int numberOfTerms -
boundingBox
-
centroidX
private final int centroidX -
centroidY
private final int centroidY -
highestDimension
-
-
Constructor Details
-
ShapeComparator
ShapeComparator(BytesRef binaryValue) throws IOException - Throws:
IOException
-
-
Method Details
-
numberOfTerms
private int numberOfTerms() -
getMinX
private int getMinX() -
getMinY
private int getMinY() -
getMaxX
private int getMaxX() -
getMaxY
private int getMaxY() -
getHighestDimension
-
getCentroidX
private int getCentroidX() -
getCentroidY
private int getCentroidY() -
skipCentroid
- Throws:
IOException
-
skipHighestDimension
- Throws:
IOException
-
relate
Computes a query component relation with the doc value shape; main entry point to the root of the binary tree- Throws:
IOException
-
relate
private PointValues.Relation relate(Component2D queryComponent2D, boolean splitX, int pMaxX, int pMaxY, int nodeSize) throws IOException recursive traversal method recurses through tree nodes to compute relation with the query component- Throws:
IOException
-
relateComponent
private PointValues.Relation relateComponent(ShapeField.DecodedTriangle.TYPE type, SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double x, Component2D queryComponent2D) throws IOException relates the component based on type (POINT, LINE, TRIANGLE)- Throws:
IOException
-
relatePoint
private PointValues.Relation relatePoint(SpatialQuery.EncodedRectangle bbox, int pMaxY, double ax, Component2D query) throws IOException - Throws:
IOException
-
relateLine
private PointValues.Relation relateLine(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D query) throws IOException - Throws:
IOException
-
relateTriangle
private PointValues.Relation relateTriangle(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D queryComponent2D) throws IOException - Throws:
IOException
-