Class LongMultiValuesToSingleValuesSource

  • All Implemented Interfaces:
    org.apache.lucene.search.SegmentCacheable

    public abstract class LongMultiValuesToSingleValuesSource
    extends org.apache.lucene.search.LongValuesSource
    An implementation of LongValuesSource for docvalues with multiple values per document, where multiple values are "aggregated" into a single value according to a given MultiValueMode.

    Some of this code was copied and adapted from org.elasticsearch.search.MultiValueMode from the Elasticsearch project.

    • Method Detail

      • equals

        public boolean equals​(Object o)
        Specified by:
        equals in class org.apache.lucene.search.LongValuesSource
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class org.apache.lucene.search.LongValuesSource
      • getValues

        public org.apache.lucene.search.LongValues getValues​(org.apache.lucene.index.LeafReaderContext ctx,
                                                             org.apache.lucene.search.DoubleValues scores)
                                                      throws IOException
        Specified by:
        getValues in class org.apache.lucene.search.LongValuesSource
        Throws:
        IOException
      • getRawNumericDocValues

        public org.apache.lucene.index.NumericDocValues getRawNumericDocValues​(org.apache.lucene.index.LeafReaderContext ctx,
                                                                               org.apache.lucene.search.DoubleValues scores)
                                                                        throws IOException
        Returns a NumericDocValues instance for the passed-in LeafReaderContext and scores If scores are not needed to calculate the values (ie returns false, callers may safely pass null for the scores parameter.
        Parameters:
        ctx - the ctx
        scores - the scores
        Returns:
        NumericDocValues
        Throws:
        IOException
      • getSortedNumericDocValues

        protected abstract org.apache.lucene.index.SortedNumericDocValues getSortedNumericDocValues​(org.apache.lucene.index.LeafReaderContext ctx)
                                                                                             throws IOException
        Throws:
        IOException
      • select

        protected org.apache.lucene.search.LongValues select​(org.apache.lucene.index.SortedNumericDocValues values)
      • select

        protected org.apache.lucene.search.LongValues select​(org.apache.lucene.index.SortedNumericDocValues values,
                                                             ChildDocIds childDocsWithValues)