Class MultiLongValuesSource

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

public abstract class MultiLongValuesSource extends Object implements SegmentCacheable
Base class for producing MultiLongValues. See also LongValuesSource for a single-valued version.

MultiLongValuesSource objects for long and int-valued NumericDocValues/SortedNumericDocValues fields can be obtained by calling fromLongField(String) and fromIntField(String). This is valid for both multi-valued and single-valued fields.

To obtain a MultiLongValuesSource from a float or double-valued NumericDocValues/SortedNumericDocValues field, use MultiDoubleValuesSource.fromFloatField(String) or MultiDoubleValuesSource.fromDoubleField(String) and then call MultiDoubleValuesSource.toMultiLongValuesSource().

To obtain a MultiLongValuesSource from an existing LongValuesSource, see fromSingleValued(LongValuesSource). Instances created in this way can be "unwrapped" using unwrapSingleton(MultiLongValuesSource) if necessary. Note that scores are never provided to the underlying LongValuesSource. LongValuesSource.rewrite(IndexSearcher) will also never be called. The user should be aware of this if using a LongValuesSource 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.