Package org.apache.solr.legacy
Class DistanceValueSource
- java.lang.Object
-
- org.apache.lucene.search.DoubleValuesSource
-
- org.apache.solr.legacy.DistanceValueSource
-
- All Implemented Interfaces:
org.apache.lucene.search.SegmentCacheable
public class DistanceValueSource extends org.apache.lucene.search.DoubleValuesSource
An implementation of the Lucene ValueSource model that returns the distance for aPointVectorStrategy
.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description DistanceValueSource(PointVectorStrategy strategy, org.locationtech.spatial4j.shape.Point from, double multiplier)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
org.apache.lucene.search.DoubleValues
getValues(org.apache.lucene.index.LeafReaderContext readerContext, org.apache.lucene.search.DoubleValues scores)
Returns the FunctionValues used by the function query.int
hashCode()
boolean
isCacheable(org.apache.lucene.index.LeafReaderContext ctx)
boolean
needsScores()
org.apache.lucene.search.DoubleValuesSource
rewrite(org.apache.lucene.search.IndexSearcher searcher)
String
toString()
Returns the ValueSource description.
-
-
-
Constructor Detail
-
DistanceValueSource
public DistanceValueSource(PointVectorStrategy strategy, org.locationtech.spatial4j.shape.Point from, double multiplier)
Constructor.
-
-
Method Detail
-
toString
public String toString()
Returns the ValueSource description.- Specified by:
toString
in classorg.apache.lucene.search.DoubleValuesSource
-
getValues
public org.apache.lucene.search.DoubleValues getValues(org.apache.lucene.index.LeafReaderContext readerContext, org.apache.lucene.search.DoubleValues scores) throws IOException
Returns the FunctionValues used by the function query.- Specified by:
getValues
in classorg.apache.lucene.search.DoubleValuesSource
- Throws:
IOException
-
needsScores
public boolean needsScores()
- Specified by:
needsScores
in classorg.apache.lucene.search.DoubleValuesSource
-
isCacheable
public boolean isCacheable(org.apache.lucene.index.LeafReaderContext ctx)
-
rewrite
public org.apache.lucene.search.DoubleValuesSource rewrite(org.apache.lucene.search.IndexSearcher searcher) throws IOException
- Specified by:
rewrite
in classorg.apache.lucene.search.DoubleValuesSource
- Throws:
IOException
-
equals
public boolean equals(Object o)
- Specified by:
equals
in classorg.apache.lucene.search.DoubleValuesSource
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classorg.apache.lucene.search.DoubleValuesSource
-
-