- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.document.SpatialQuery
-
- org.apache.lucene.document.BaseShapeDocValuesQuery
-
- Direct Known Subclasses:
LatLonShapeDocValuesQuery
,XYShapeDocValuesQuery
abstract class BaseShapeDocValuesQuery extends SpatialQuery
Base query class for ShapeDocValues queries. Concrete implementations include:LatLonShapeDocValuesQuery
andXYShapeDocValuesQuery
-
-
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
Constructors Constructor Description BaseShapeDocValuesQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Geometry... geometries)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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
matchCost()
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 Detail
-
BaseShapeDocValuesQuery
BaseShapeDocValuesQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Geometry... geometries)
-
-
Method Detail
-
validateRelation
private static ShapeField.QueryRelation validateRelation(ShapeField.QueryRelation queryRelation)
-
getShapeDocValues
protected abstract ShapeDocValues getShapeDocValues(BytesRef binaryValue)
-
getScorerSupplier
protected ScorerSupplier getScorerSupplier(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, ConstantScoreWeight weight, float boost, float score) throws java.io.IOException
- Overrides:
getScorerSupplier
in classSpatialQuery
- Throws:
java.io.IOException
-
match
protected boolean match(ShapeDocValues shapeDocValues) throws java.io.IOException
matches the doc value to the query; overridable to provide custom query logic- Throws:
java.io.IOException
-
matchCost
protected float matchCost()
compute the cost of the query; overrideable
-
matchesComponent
protected boolean matchesComponent(ShapeDocValues dv, ShapeField.QueryRelation queryRelation, Component2D component) throws java.io.IOException
- Throws:
java.io.IOException
-
-