Interface ExponentialHistogramValuesReader


public interface ExponentialHistogramValuesReader
  • Method Details

    • histogramValue

      ExponentialHistogram histogramValue() throws IOException
      Returns the histogram value for the current document. Must be called only after a successful call to advanceExact(int). The returned histogram instance may be reused across calls, so if you need to hold on to it, make a copy.
      Returns:
      the histogram value for the current document
      Throws:
      IOException
    • valuesCountValue

      long valuesCountValue() throws IOException
      A shortcut for invoking ExponentialHistogram.valueCount() on the return value of histogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call to advanceExact(int).
      Returns:
      the count of values in the histogram for the current document
      Throws:
      IOException
    • sumValue

      double sumValue() throws IOException
      A shortcut for invoking ExponentialHistogram.sum() on the return value of histogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call to advanceExact(int).
      Returns:
      the sum of values in the histogram for the current document
      Throws:
      IOException
    • minValue

      double minValue() throws IOException
      A shortcut for invoking ExponentialHistogram.min() on the return value of histogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call to advanceExact(int). If the histogram is empty, this will return Double.POSITIVE_INFINITY.
      Returns:
      the minimum of the values in the histogram for the current document
      Throws:
      IOException
    • maxValue

      double maxValue() throws IOException
      A shortcut for invoking ExponentialHistogram.max() on the return value of histogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call to advanceExact(int). If the histogram is empty, this will return Double.NEGATIVE_INFINITY.
      Returns:
      the maximum of the values in the histogram for the current document
      Throws:
      IOException
    • advanceExact

      boolean advanceExact(int target) throws IOException
      Advance the iterator to exactly target and return whether target has a value. target must be greater than or equal to the current doc ID and must be a valid doc ID, ie. ≥ 0 and < maxDoc.
      Throws:
      IOException
    • docValueCount

      default int docValueCount()
    • docIdIterator

      @Nullable default org.apache.lucene.search.DocIdSetIterator docIdIterator()
      Returns:
      a doc id iterator over the doc values when available, otherwise null. Moving the returned iterator also moves the position of the ExponentialHistogramValuesReader instance.