Class MultiDoubleValuesSource

java.lang.Object
org.apache.lucene.facet.MultiDoubleValuesSource
All Implemented Interfaces:
SegmentCacheable

public abstract class MultiDoubleValuesSource extends Object implements SegmentCacheable
Base class for producing MultiDoubleValues. See also DoubleValuesSource for a single-valued version.

MultiDoubleValuesSource objects for NumericDocValues/SortedNumericDocValues fields can be obtained by calling fromFloatField(String), fromDoubleField(String), fromIntField(String), or fromLongField(String). If custom long-to-double logic is required, fromField(String, LongToDoubleFunction) can be used. This is valid for both multi-valued and single-valued fields.

To obtain a MultiDoubleValuesSource from an existing DoubleValuesSource, see fromSingleValued(DoubleValuesSource). Instances created in this way can be "unwrapped" using unwrapSingleton(MultiDoubleValuesSource) if necessary. Note that scores are never provided to the underlying DoubleValuesSource. DoubleValuesSource.rewrite(IndexSearcher) will also never be called. The user should be aware of this if using a DoubleValuesSource that relies on rewriting or scores. The faceting use-cases don't call rewrite or provide scores, which is why this simplification was made.

Currently meant only for use within the faceting module. Could be further generalized and made available for more use-cases outside faceting if there is a desire to do so.

WARNING: This API is experimental and might change in incompatible ways in the next release.