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.DoubleValuesSourceAn 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 booleanequals(Object o)org.apache.lucene.search.DoubleValuesgetValues(org.apache.lucene.index.LeafReaderContext readerContext, org.apache.lucene.search.DoubleValues scores)Returns the FunctionValues used by the function query.inthashCode()booleanisCacheable(org.apache.lucene.index.LeafReaderContext ctx)booleanneedsScores()org.apache.lucene.search.DoubleValuesSourcerewrite(org.apache.lucene.search.IndexSearcher searcher)StringtoString()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:
toStringin 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 IOExceptionReturns the FunctionValues used by the function query.- Specified by:
getValuesin classorg.apache.lucene.search.DoubleValuesSource- Throws:
IOException
-
needsScores
public boolean needsScores()
- Specified by:
needsScoresin 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:
rewritein classorg.apache.lucene.search.DoubleValuesSource- Throws:
IOException
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classorg.apache.lucene.search.DoubleValuesSource
-
hashCode
public int hashCode()
- Specified by:
hashCodein classorg.apache.lucene.search.DoubleValuesSource
-
-