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
public class CachingDoubleValueSource extends DoubleValuesSource
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 Constructor Description CachingDoubleValueSource(DoubleValuesSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Explanation
explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation)
DoubleValues
getValues(LeafReaderContext readerContext, DoubleValues scores)
int
hashCode()
boolean
isCacheable(LeafReaderContext ctx)
boolean
needsScores()
DoubleValuesSource
rewrite(IndexSearcher searcher)
String
toString()
-
Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, similarityToQueryVector, similarityToQueryVector, toLongValuesSource
-
-
-
-
Constructor Detail
-
CachingDoubleValueSource
public CachingDoubleValueSource(DoubleValuesSource source)
-
-
Method Detail
-
toString
public String toString()
- Specified by:
toString
in classDoubleValuesSource
-
getValues
public DoubleValues getValues(LeafReaderContext readerContext, DoubleValues scores) throws IOException
- Specified by:
getValues
in classDoubleValuesSource
- Throws:
IOException
-
needsScores
public boolean needsScores()
- Specified by:
needsScores
in classDoubleValuesSource
-
isCacheable
public boolean isCacheable(LeafReaderContext ctx)
-
explain
public Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) throws IOException
- Overrides:
explain
in classDoubleValuesSource
- Throws:
IOException
-
rewrite
public DoubleValuesSource rewrite(IndexSearcher searcher) throws IOException
- Specified by:
rewrite
in classDoubleValuesSource
- Throws:
IOException
-
equals
public boolean equals(Object o)
- Specified by:
equals
in classDoubleValuesSource
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classDoubleValuesSource
-
-