Class DateHistogramGroupConfig

java.lang.Object
org.elasticsearch.xpack.core.rollup.job.DateHistogramGroupConfig
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject
Direct Known Subclasses:
DateHistogramGroupConfig.CalendarInterval, DateHistogramGroupConfig.FixedInterval

public abstract class DateHistogramGroupConfig extends Object implements Writeable, org.elasticsearch.xcontent.ToXContentObject
The configuration object for the histograms in the rollup config { "groups": [ "date_histogram": { "field" : "foo", "interval" : "1d", "delay": "30d", "time_zone" : "EST" } ] }
  • Field Details

  • Constructor Details

    • DateHistogramGroupConfig

      protected DateHistogramGroupConfig(String field, DateHistogramInterval interval, @Nullable DateHistogramInterval delay, @Nullable String timeZone)
      Create a new DateHistogramGroupConfig using the given configuration parameters.

      The field and interval are required to compute the date histogram for the rolled up documents. The delay is optional and can be set to null. It defines how long to wait before rolling up new documents. The timeZone is optional and can be set to null. When configured, the time zone value is resolved using (ZoneId.of(String) and must match a time zone identifier.

      Parameters:
      field - the name of the date field to use for the date histogram (required)
      interval - the interval to use for the date histogram (required)
      delay - the time delay (optional)
      timeZone - the id of time zone to use to calculate the date histogram (optional). When null, the UTC timezone is used.
      Since:
      7.2.0
    • DateHistogramGroupConfig

      protected DateHistogramGroupConfig(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details