LongValuesSource

Base class for producing LongValues

To obtain a LongValues object for a leaf reader, clients should call .rewrite against the top-level searcher, and then .getValues.

LongValuesSource objects for long and int-valued NumericDocValues fields can be obtained by calling .fromLongField and .fromIntField.

To obtain a LongValuesSource from a float or double-valued NumericDocValues field, use or DoubleValuesSource.fromDoubleField and then call DoubleValuesSource.toLongValuesSource.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A ConstantLongValuesSource that always returns a constant value

Functions

Link copied to clipboard
abstract operator override fun equals(obj: Any?): Boolean
Link copied to clipboard

Create a sort field based on the value of this producer

Link copied to clipboard
abstract fun getValues(ctx: LeafReaderContext, scores: DoubleValues?): LongValues

Returns a LongValues instance for the passed-in LeafReaderContext and scores

Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
abstract fun needsScores(): Boolean

Return true if document scores are needed to calculate values

Link copied to clipboard
abstract fun rewrite(searcher: IndexSearcher): LongValuesSource

Return a LongValuesSource specialised for the given IndexSearcher

Link copied to clipboard

Convert to a DoubleValuesSource by casting long values to doubles

Link copied to clipboard
abstract override fun toString(): String