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.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