java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.document.SpatialQuery
org.apache.lucene.document.BaseShapeDocValuesQuery
- Direct Known Subclasses:
LatLonShapeDocValuesQuery
,XYShapeDocValuesQuery
Base query class for ShapeDocValues queries. Concrete implementations include:
LatLonShapeDocValuesQuery
and XYShapeDocValuesQuery
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.document.SpatialQuery
SpatialQuery.EncodedRectangle, SpatialQuery.SpatialVisitor
-
Field Summary
Fields inherited from class org.apache.lucene.document.SpatialQuery
field, geometries, queryComponent2D, queryRelation
-
Constructor Summary
ConstructorsConstructorDescriptionBaseShapeDocValuesQuery
(String field, ShapeField.QueryRelation queryRelation, Geometry... geometries) -
Method Summary
Modifier and TypeMethodDescriptionprotected ScorerSupplier
getScorerSupplier
(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, ConstantScoreWeight weight, float boost, float score) protected abstract ShapeDocValues
getShapeDocValues
(BytesRef binaryValue) protected boolean
match
(ShapeDocValues shapeDocValues) matches the doc value to the query; overridable to provide custom query logicprotected float
compute the cost of the query; overrideableprotected boolean
matchesComponent
(ShapeDocValues dv, ShapeField.QueryRelation queryRelation, Component2D component) private static ShapeField.QueryRelation
validateRelation
(ShapeField.QueryRelation queryRelation) Methods inherited from class org.apache.lucene.document.SpatialQuery
createComponent2D, createWeight, equals, equalsTo, getField, getQueryRelation, getSpatialVisitor, hashCode, queryIsCacheable, toString, transposeRelation, visit
-
Constructor Details
-
BaseShapeDocValuesQuery
BaseShapeDocValuesQuery(String field, ShapeField.QueryRelation queryRelation, Geometry... geometries)
-
-
Method Details
-
validateRelation
-
getShapeDocValues
-
getScorerSupplier
protected ScorerSupplier getScorerSupplier(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, ConstantScoreWeight weight, float boost, float score) throws IOException - Overrides:
getScorerSupplier
in classSpatialQuery
- Throws:
IOException
-
match
matches the doc value to the query; overridable to provide custom query logic- Throws:
IOException
-
matchCost
protected float matchCost()compute the cost of the query; overrideable -
matchesComponent
protected boolean matchesComponent(ShapeDocValues dv, ShapeField.QueryRelation queryRelation, Component2D component) throws IOException - Throws:
IOException
-