Interface ExponentialHistogramValuesReader


public interface ExponentialHistogramValuesReader
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    advanceExact(int docId)
    Advances to the exact document id, returning true if the document has a value for this field.
    org.elasticsearch.exponentialhistogram.ExponentialHistogram
    Returns the histogram value for the current document.
    double
    A shortcut for invoking ExponentialHistogram.max() on the return value of histogramValue().
    double
    A shortcut for invoking ExponentialHistogram.min() on the return value of histogramValue().
    double
    A shortcut for invoking ExponentialHistogram.sum() on the return value of histogramValue().
    long
    A shortcut for invoking ExponentialHistogram.valueCount() on the return value of histogramValue().
  • Method Details

    • advanceExact

      boolean advanceExact(int docId) throws IOException
      Advances to the exact document id, returning true if the document has a value for this field.
      Parameters:
      docId - the document id
      Returns:
      true if the document has a value for this field, false otherwise
      Throws:
      IOException
    • histogramValue

      org.elasticsearch.exponentialhistogram.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