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 ScorerSuppliergetScorerSupplier(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, float boost, float score) protected abstract ShapeDocValuesgetShapeDocValues(BytesRef binaryValue) protected booleanmatch(ShapeDocValues shapeDocValues) matches the doc value to the query; overridable to provide custom query logicprotected floatcompute the cost of the query; overrideableprotected booleanmatchesComponent(ShapeDocValues dv, ShapeField.QueryRelation queryRelation, Component2D component) private static ShapeField.QueryRelationvalidateRelation(ShapeField.QueryRelation queryRelation) Methods inherited from class org.apache.lucene.document.SpatialQuery
createComponent2D, createWeight, equals, equalsTo, getField, getQueryRelation, getSpatialVisitor, hashCode, queryIsCacheable, toString, transposeRelation, visitMethods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
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, float boost, float score) throws IOException - Overrides:
getScorerSupplierin 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
-