Class DateRangeAggregation

    • Field Detail

      • id

        protected final java.lang.String id
    • Constructor Detail

      • DateRangeAggregation

        public DateRangeAggregation​(java.lang.String id,
                                    DocumentTypeField field,
                                    java.util.Date startDate,
                                    java.util.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
    • Method Detail

      • getRanges

        public java.util.List<Range<T>> getRanges()
        Returns the ranges.
        Returns:
        the ranges.
        Since:
        11.0.0
      • getId

        public java.lang.String getId()
        Description copied from interface: IAggregation
        Returns the aggregation identifier.
        Specified by:
        getId in interface IAggregation
        Returns:
        the aggregation identifier.