Class IndexReaderFunctions.NoCacheConstantLongValuesSource
java.lang.Object
org.apache.lucene.search.LongValuesSource
org.apache.lucene.queries.function.IndexReaderFunctions.NoCacheConstantLongValuesSource
- All Implemented Interfaces:
SegmentCacheable
- Enclosing class:
IndexReaderFunctions
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final LongValuesSource(package private) final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNoCacheConstantLongValuesSource(long value, LongValuesSource parent) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetValues(LeafReaderContext ctx, DoubleValues scores) Returns aLongValuesinstance for the passed-in LeafReaderContext and scores If scores are not needed to calculate the values (iereturns false, callers may safely passnullfor thescoresparameter.inthashCode()booleanbooleanReturn true if document scores are needed to calculate valuesrewrite(IndexSearcher reader) Return a LongValuesSource specialised for the given IndexSearcher Implementations should assume that this will only be called once.toString()Methods inherited from class org.apache.lucene.search.LongValuesSource
constant, fromIntField, fromLongField, getSortField, toDoubleValuesSource
-
Field Details
-
value
final long value -
parent
-
-
Constructor Details
-
NoCacheConstantLongValuesSource
-
-
Method Details
-
getValues
Description copied from class:LongValuesSourceReturns aLongValuesinstance for the passed-in LeafReaderContext and scores If scores are not needed to calculate the values (iereturns false, callers may safely passnullfor thescoresparameter.- Specified by:
getValuesin classLongValuesSource- Throws:
IOException
-
needsScores
public boolean needsScores()Description copied from class:LongValuesSourceReturn true if document scores are needed to calculate values- Specified by:
needsScoresin classLongValuesSource
-
rewrite
Description copied from class:LongValuesSourceReturn a LongValuesSource specialised for the given IndexSearcher Implementations should assume that this will only be called once. IndexSearcher-independent implementations can just returnthis- Specified by:
rewritein classLongValuesSource- Throws:
IOException
-
equals
- Specified by:
equalsin classLongValuesSource
-
hashCode
public int hashCode()- Specified by:
hashCodein classLongValuesSource
-
toString
- Specified by:
toStringin classLongValuesSource
-
isCacheable
- Returns:
trueif the object can be cached against a given leaf
-