Class DateHistogramValuesSource

java.lang.Object
org.elasticsearch.search.aggregations.bucket.composite.DateHistogramValuesSource
All Implemented Interfaces:
Closeable, AutoCloseable, Releasable, SizedBucketAggregator

public class DateHistogramValuesSource extends Object implements SizedBucketAggregator
A SingleDimensionValuesSource for date histogram values.
  • Field Details

    • format

      protected final DocValueFormat format
    • fieldType

      @Nullable protected final MappedFieldType fieldType
    • missingBucket

      protected final boolean missingBucket
    • missingOrder

      protected final MissingOrder missingOrder
    • size

      protected final int size
    • reverseMul

      protected final int reverseMul
    • afterValue

      protected Long afterValue
  • Method Details

    • bucketSize

      public double bucketSize(long bucket, Rounding.DateTimeUnit unitSize)
      Description copied from interface: SizedBucketAggregator
      Reports size of the particular bucket in requested units.
      Specified by:
      bucketSize in interface SizedBucketAggregator
    • bucketSize

      public double bucketSize(Rounding.DateTimeUnit unitSize)
      Description copied from interface: SizedBucketAggregator
      Reports size of all buckets in requested units. Throws an exception if it is not possible to calculate without knowing the concrete bucket.
      Specified by:
      bucketSize in interface SizedBucketAggregator
    • close

      public void close()
    • checkIfSortedDocsIsApplicable

      protected boolean checkIfSortedDocsIsApplicable(org.apache.lucene.index.IndexReader reader, MappedFieldType fieldType)
      Returns true if a SortedDocsProducer should be used to optimize the execution.