Class ValuesSource

java.lang.Object
org.opensearch.search.aggregations.support.ValuesSource
Direct Known Subclasses:
ValuesSource.Bytes, ValuesSource.GeoPoint, ValuesSource.Numeric, ValuesSource.Range

public abstract class ValuesSource extends Object
Base class for a ValuesSource; the primitive data for an agg
Opensearch.internal:
  • Constructor Details

    • ValuesSource

      public ValuesSource()
  • Method Details

    • bytesValues

      public abstract SortedBinaryDocValues bytesValues(org.apache.lucene.index.LeafReaderContext context) throws IOException
      Get the current ValuesSource.Bytes.WithScript.BytesValues.
      Throws:
      IOException
    • docsWithValue

      public abstract DocValueBits docsWithValue(org.apache.lucene.index.LeafReaderContext context) throws IOException
      Throws:
      IOException
    • needsScores

      public boolean needsScores()
      Whether this values source needs scores.
    • roundingPreparer

      public abstract Function<Rounding,Rounding.Prepared> roundingPreparer(org.apache.lucene.index.IndexReader reader) throws IOException
      Build a function prepares rounding values to be called many times.

      This returns a Function because auto date histogram will need to call it many times over the course of running the aggregation.

      Throws:
      IOException
    • hasGlobalOrdinals

      public boolean hasGlobalOrdinals()
      Check if this values source supports using global ordinals