Package org.apache.lucene.spatial.util
Class DistanceToShapeValueSource
java.lang.Object
org.apache.lucene.search.DoubleValuesSource
org.apache.lucene.spatial.util.DistanceToShapeValueSource
- All Implemented Interfaces:
SegmentCacheable
The distance from a provided Point to a Point retrieved from an ShapeValuesSource. The distance
is calculated via a
DistanceCalculator.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.lucene.search.DoubleValuesSource
SCORES -
Constructor Summary
ConstructorsConstructorDescriptionDistanceToShapeValueSource(ShapeValuesSource shapeValueSource, org.locationtech.spatial4j.shape.Point queryPoint, double multiplier, org.locationtech.spatial4j.context.SpatialContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetValues(LeafReaderContext readerContext, DoubleValues scores) inthashCode()booleanbooleanrewrite(IndexSearcher searcher) toString()Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, explain, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, similarityToQueryVector, similarityToQueryVector, toLongValuesSource, toSortableLongDoubleValuesSource
-
Constructor Details
-
DistanceToShapeValueSource
public DistanceToShapeValueSource(ShapeValuesSource shapeValueSource, org.locationtech.spatial4j.shape.Point queryPoint, double multiplier, org.locationtech.spatial4j.context.SpatialContext ctx)
-
-
Method Details
-
toString
- Specified by:
toStringin classDoubleValuesSource
-
getValues
public DoubleValues getValues(LeafReaderContext readerContext, DoubleValues scores) throws IOException - Specified by:
getValuesin classDoubleValuesSource- Throws:
IOException
-
needsScores
public boolean needsScores()- Specified by:
needsScoresin classDoubleValuesSource
-
isCacheable
-
rewrite
- Specified by:
rewritein classDoubleValuesSource- Throws:
IOException
-
equals
- Specified by:
equalsin classDoubleValuesSource
-
hashCode
public int hashCode()- Specified by:
hashCodein classDoubleValuesSource
-