Class MultiLongValuesSource
- All Implemented Interfaces:
- SegmentCacheable
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.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleanstatic MultiLongValuesSourcefromIntField(String field) Creates a MultiLongValuesSource that wraps an int-valued fieldstatic MultiLongValuesSourcefromLongField(String field) Creates a MultiLongValuesSource that wraps a long-valued fieldstatic MultiLongValuesSourcefromSingleValued(LongValuesSource singleValued) Creates a MultiLongValuesSource that wraps a single-valuedLongValuesSourceabstract MultiLongValuesReturns aMultiLongValuesinstance for the passed-in LeafReaderContextabstract inthashCode()final MultiDoubleValuesSourceConvert to a MultiDoubleValuesSource by casting long values to doublesabstract StringtoString()static LongValuesSourceReturns a single-valued view of theMultiLongValuesSourceif it was previously wrapped withfromSingleValued(LongValuesSource), or null.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.search.SegmentCacheableisCacheable
- 
Constructor Details- 
MultiLongValuesSourcepublic MultiLongValuesSource()Instantiates a new MultiLongValuesSource
 
- 
- 
Method Details- 
getValuesReturns aMultiLongValuesinstance for the passed-in LeafReaderContext- Throws:
- IOException
 
- 
hashCodepublic abstract int hashCode()
- 
equals
- 
toString
- 
fromLongFieldCreates a MultiLongValuesSource that wraps a long-valued field
- 
fromIntFieldCreates a MultiLongValuesSource that wraps an int-valued field
- 
fromSingleValuedCreates a MultiLongValuesSource that wraps a single-valuedLongValuesSource
- 
unwrapSingletonReturns a single-valued view of theMultiLongValuesSourceif it was previously wrapped withfromSingleValued(LongValuesSource), or null.
- 
toMultiDoubleValuesSourceConvert to a MultiDoubleValuesSource by casting long values to doubles
 
-