Package org.apache.lucene.document
Class ShapeQuery.RelationScorerSupplier
- java.lang.Object
-
- org.apache.lucene.search.ScorerSupplier
-
- org.apache.lucene.document.ShapeQuery.RelationScorerSupplier
-
- Enclosing class:
- ShapeQuery
private abstract static class ShapeQuery.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 longcostprivate ShapeQueryqueryprivate PointValuesvalues
-
Constructor Summary
Constructors Constructor Description RelationScorerSupplier(PointValues values, ShapeQuery query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcost()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-
Methods inherited from class org.apache.lucene.search.ScorerSupplier
get
-
-
-
-
Field Detail
-
values
private final PointValues values
-
query
private final ShapeQuery query
-
cost
private long cost
-
-
Constructor Detail
-
RelationScorerSupplier
RelationScorerSupplier(PointValues values, ShapeQuery query)
-
-
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- 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: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:
DocIdSetIterator.cost()
-
-