Package org.apache.lucene.spatial.util
Class CachingDoubleValueSource
java.lang.Object
org.apache.lucene.search.DoubleValuesSource
org.apache.lucene.spatial.util.CachingDoubleValueSource
- All Implemented Interfaces:
SegmentCacheable
Caches the doubleVal of another value source in a HashMap so that it is computed only once.
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexplain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) getValues(LeafReaderContext readerContext, 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
-
CachingDoubleValueSource
-
-
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
-
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
-