Package org.apache.lucene.spatial.util
Class ReciprocalDoubleValuesSource
java.lang.Object
org.apache.lucene.search.DoubleValuesSource
org.apache.lucene.spatial.util.ReciprocalDoubleValuesSource
- All Implemented Interfaces:
SegmentCacheable
Transforms a DoubleValuesSource using the formula v = k / (v + k)
-
Field Summary
Fields inherited from class org.apache.lucene.search.DoubleValuesSource
SCORES -
Constructor Summary
ConstructorsConstructorDescriptionReciprocalDoubleValuesSource(double distToEdge, DoubleValuesSource input) Creates a ReciprocalDoubleValuesSource -
Method Summary
Modifier and TypeMethodDescriptionbooleanexplain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) getValues(LeafReaderContext ctx, DoubleValues scores) inthashCode()booleanbooleanrewrite(IndexSearcher searcher) toString()Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, getSortField, similarityToQueryVector, similarityToQueryVector, toLongValuesSource, toSortableLongDoubleValuesSource
-
Constructor Details
-
ReciprocalDoubleValuesSource
Creates a ReciprocalDoubleValuesSource- Parameters:
distToEdge- the value k in v = k / (v + k)input- the input DoubleValuesSource to transform
-
-
Method Details
-
getValues
- Specified by:
getValuesin classDoubleValuesSource- Throws:
IOException
-
needsScores
public boolean needsScores()- Specified by:
needsScoresin classDoubleValuesSource
-
isCacheable
-
explain
public Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) throws IOException - Overrides:
explainin classDoubleValuesSource- Throws:
IOException
-
rewrite
- Specified by:
rewritein classDoubleValuesSource- Throws:
IOException
-
equals
- Specified by:
equalsin classDoubleValuesSource
-
hashCode
public int hashCode()- Specified by:
hashCodein classDoubleValuesSource
-
toString
- Specified by:
toStringin classDoubleValuesSource
-