Module org.elasticsearch.xcore
Interface ExponentialHistogramValuesReader
public interface ExponentialHistogramValuesReader
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadvanceExact(int docId) Advances to the exact document id, returning true if the document has a value for this field.org.elasticsearch.exponentialhistogram.ExponentialHistogramReturns the histogram value for the current document.doublesumValue()A shortcut for invokingExponentialHistogram.sum()on the return value ofhistogramValue().longA shortcut for invokingExponentialHistogram.valueCount()on the return value ofhistogramValue().
-
Method Details
-
advanceExact
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
Returns the histogram value for the current document. Must be called only after a successful call toadvanceExact(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
A shortcut for invokingExponentialHistogram.valueCount()on the return value ofhistogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call toadvanceExact(int).- Returns:
- the count of values in the histogram for the current document
- Throws:
IOException
-
sumValue
A shortcut for invokingExponentialHistogram.sum()on the return value ofhistogramValue(). This method is more performant because it avoids loading the unnecessary parts of the histogram. Must be called only after a successful call toadvanceExact(int).- Returns:
- the sum of values in the histogram for the current document
- Throws:
IOException
-