DoubleValuesSource

Base class for producing DoubleValues

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

DoubleValuesSource objects for NumericDocValues fields can be obtained by calling .fromDoubleField, .fromFloatField, .fromIntField or .fromLongField, or from .fromField if special long-to-double encoding is required.

Scores may be used as a source for value calculations by wrapping a Scorer using .fromScorer and passing the resulting DoubleValues to .getValues. The scores can then be accessed using the .SCORES DoubleValuesSource.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract operator override fun equals(obj: Any?): Boolean
Link copied to clipboard
open fun explain(ctx: LeafReaderContext, docId: Int, scoreExplanation: Explanation): Explanation

An explanation of the value for the named document.

Link copied to clipboard

Create a sort field based on the value of this producer

Link copied to clipboard

Returns a DoubleValues 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

Return a DoubleValuesSource specialised for the given IndexSearcher

Link copied to clipboard

Convert to a LongValuesSource by casting the double values to longs

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