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
private abstract static class SpatialQuery.RelationScorerSupplier extends ScorerSupplier
utility class for implementing constant score logic specific to INTERSECT, WITHIN, and DISJOINT
-
-
Field Summary
Fields Modifier and Type Field Description private long
cost
private java.lang.String
field
private ShapeField.QueryRelation
queryRelation
private SpatialQuery.SpatialVisitor
spatialVisitor
private PointValues
values
-
Constructor Summary
Constructors Constructor Description RelationScorerSupplier(PointValues values, SpatialQuery.SpatialVisitor spatialVisitor, ShapeField.QueryRelation queryRelation, java.lang.String field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
cost()
Get an estimate of theScorer
that would be returned byScorerSupplier.get(long)
.private Scorer
getContainsDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode)
private Scorer
getDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode)
Scorer used for WITHIN and DISJOINTprotected Scorer
getScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode)
private Scorer
getSparseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode)
Scorer used for INTERSECTS and single value points-
Methods inherited from class org.apache.lucene.search.ScorerSupplier
get, setTopLevelScoringClause
-
-
-
-
Field Detail
-
values
private final PointValues values
-
spatialVisitor
private final SpatialQuery.SpatialVisitor spatialVisitor
-
queryRelation
private final ShapeField.QueryRelation queryRelation
-
field
private final java.lang.String field
-
cost
private long cost
-
-
Constructor Detail
-
RelationScorerSupplier
RelationScorerSupplier(PointValues values, SpatialQuery.SpatialVisitor spatialVisitor, ShapeField.QueryRelation queryRelation, java.lang.String field)
-
-
Method Detail
-
getScorer
protected Scorer getScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws java.io.IOException
- Throws:
java.io.IOException
-
getSparseScorer
private Scorer getSparseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws java.io.IOException
Scorer used for INTERSECTS and single value points- Throws:
java.io.IOException
-
getDenseScorer
private Scorer getDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws java.io.IOException
Scorer used for WITHIN and DISJOINT- Throws:
java.io.IOException
-
getContainsDenseScorer
private Scorer getContainsDenseScorer(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) throws java.io.IOException
- Throws:
java.io.IOException
-
cost
public long cost()
Description copied from class:ScorerSupplier
Get an estimate of theScorer
that would be returned byScorerSupplier.get(long)
. This may be a costly operation, so it should only be called if necessary.- Specified by:
cost
in classScorerSupplier
- See Also:
DocIdSetIterator.cost()
-
-