Module org.apache.lucene.core
Package org.apache.lucene.document
Class SpatialQuery.RelationScorerSupplier
java.lang.Object
org.apache.lucene.search.ScorerSupplier
org.apache.lucene.document.SpatialQuery.RelationScorerSupplier
- Enclosing class:
SpatialQuery
utility class for implementing constant score logic specific to INTERSECT, WITHIN, and DISJOINT
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate final Stringprivate final ShapeField.QueryRelationprivate final SpatialQuery.SpatialVisitorprivate final PointValues -
Constructor Summary
ConstructorsConstructorDescriptionRelationScorerSupplier(PointValues values, SpatialQuery.SpatialVisitor spatialVisitor, ShapeField.QueryRelation queryRelation, String field) -
Method Summary
Modifier and TypeMethodDescriptionlongcost()Get an estimate of theScorerthat would be returned byScorerSupplier.get(long).private ScorergetContainsDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) private ScorergetDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) Scorer used for WITHIN and DISJOINTprotected ScorergetScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) private ScorergetSparseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) Scorer used for INTERSECTS and single value pointsMethods inherited from class org.apache.lucene.search.ScorerSupplier
get, setTopLevelScoringClause
-
Field Details
-
values
-
spatialVisitor
-
queryRelation
-
field
-
cost
private long cost
-
-
Constructor Details
-
RelationScorerSupplier
RelationScorerSupplier(PointValues values, SpatialQuery.SpatialVisitor spatialVisitor, ShapeField.QueryRelation queryRelation, String field)
-
-
Method Details
-
getScorer
protected Scorer getScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws IOException - Throws:
IOException
-
getSparseScorer
private Scorer getSparseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws IOException Scorer used for INTERSECTS and single value points- Throws:
IOException
-
getDenseScorer
private Scorer getDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws IOException Scorer used for WITHIN and DISJOINT- Throws:
IOException
-
getContainsDenseScorer
private Scorer getContainsDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws IOException - Throws:
IOException
-
cost
public long cost()Description copied from class:ScorerSupplierGet an estimate of theScorerthat would be returned byScorerSupplier.get(long). This may be a costly operation, so it should only be called if necessary.- Specified by:
costin classScorerSupplier- See Also:
-