Package org.apache.lucene.spatial.vector
Class DistanceValueSource
java.lang.Object
org.apache.lucene.search.DoubleValuesSource
org.apache.lucene.spatial.vector.DistanceValueSource
- All Implemented Interfaces:
SegmentCacheable
A DoubleValuesSource that returns the distance for a
PointVectorStrategy
.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.lucene.search.DoubleValuesSource
SCORES
-
Constructor Summary
ConstructorDescriptionDistanceValueSource
(PointVectorStrategy strategy, org.locationtech.spatial4j.shape.Point from, double multiplier) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValues
(LeafReaderContext readerContext, DoubleValues scores) Returns the FunctionValues used by the function query.int
hashCode()
boolean
boolean
rewrite
(IndexSearcher searcher) toString()
Returns the ValueSource description.Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, explain, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, toLongValuesSource
-
Constructor Details
-
DistanceValueSource
public DistanceValueSource(PointVectorStrategy strategy, org.locationtech.spatial4j.shape.Point from, double multiplier) Constructor.
-
-
Method Details
-
toString
Returns the ValueSource description.- Specified by:
toString
in classDoubleValuesSource
-
getValues
public DoubleValues getValues(LeafReaderContext readerContext, DoubleValues scores) throws IOException Returns the FunctionValues used by the function query.- Specified by:
getValues
in classDoubleValuesSource
- Throws:
IOException
-
needsScores
public boolean needsScores()- Specified by:
needsScores
in classDoubleValuesSource
-
isCacheable
-
rewrite
- Specified by:
rewrite
in classDoubleValuesSource
- Throws:
IOException
-
equals
- Specified by:
equals
in classDoubleValuesSource
-
hashCode
public int hashCode()- Specified by:
hashCode
in classDoubleValuesSource
-