Class DateRangeAggregation

    • Field Detail

      • id

        protected final String id
    • Constructor Detail

      • DateRangeAggregation

        public DateRangeAggregation​(String id,
                                    DocumentTypeField field,
                                    Date startDate,
                                    Date endDate,
                                    int numRanges)
        Creates a new DateRangeAggregation that receives a start date (startDate), an end date (endDate) and a number of ranges to be produced (numRanges). It splits the interval (from start date to end date) in ranges and each range will produce a bucket (that will have the upper limit of the range as its key).
        Parameters:
        id - the aggregation identifier.
        field - the aggregated field. Must be a date time field.
        startDate - the start date.
        endDate - the end date.
        numRanges - the number of ranges to be produced.
        Since:
        11.0.0