类 DateHistogramGroupConfig
java.lang.Object
org.easysearch.client.rollup.job.config.DateHistogramGroupConfig
- 所有已实现的接口:
Validatable,org.easysearch.common.xcontent.ToXContent,org.easysearch.common.xcontent.ToXContentObject
public class DateHistogramGroupConfig extends java.lang.Object implements Validatable, org.easysearch.common.xcontent.ToXContentObject
The configuration object for the histograms in the rollup config
{
"groups": [
"date_histogram": {
"field" : "foo",
"interval" : "1d",
"delay": "30d",
"time_zone" : "EST"
}
]
}
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classDateHistogramGroupConfig.CalendarIntervalCalendarInterval is aDateHistogramGroupConfigthat uses calendar-aware intervals for rolling up data.static classDateHistogramGroupConfig.FixedIntervalFixedInterval is aDateHistogramGroupConfigthat uses a fixed time interval for rolling up data.从接口继承的嵌套类/接口 org.easysearch.common.xcontent.ToXContent
org.easysearch.common.xcontent.ToXContent.DelegatingMapParams, org.easysearch.common.xcontent.ToXContent.MapParams, org.easysearch.common.xcontent.ToXContent.Params -
字段概要
从接口继承的字段 org.easysearch.common.xcontent.ToXContent
EMPTY_PARAMS从接口继承的字段 org.easysearch.client.Validatable
EMPTY -
构造器概要
构造器 构造器 说明 DateHistogramGroupConfig(java.lang.String field, org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval interval)已过时。DateHistogramGroupConfig(java.lang.String field, org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval interval, org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval delay, java.lang.String timeZone)已过时。Build a DateHistoConfig usingDateHistogramGroupConfig.CalendarIntervalorDateHistogramGroupConfig.FixedIntervalinstead -
方法概要
修饰符和类型 方法 说明 booleanequals(java.lang.Object other)static DateHistogramGroupConfigfromXContent(org.easysearch.common.xcontent.XContentParser parser)org.easysearch.search.aggregations.bucket.histogram.DateHistogramIntervalgetDelay()Get the time delay for this histogramjava.lang.StringgetField()Get the date fieldorg.easysearch.search.aggregations.bucket.histogram.DateHistogramIntervalgetInterval()Get the date intervaljava.lang.StringgetTimeZone()Get the timezone to applyinthashCode()org.easysearch.common.xcontent.XContentBuildertoXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params)java.util.Optional<ValidationException>validate()Perform validation.从类继承的方法 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.easysearch.common.xcontent.ToXContentObject
isFragment
-
构造器详细资料
-
DateHistogramGroupConfig
@Deprecated public DateHistogramGroupConfig(java.lang.String field, org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval interval)已过时。Build a DateHistoConfig usingDateHistogramGroupConfig.CalendarIntervalorDateHistogramGroupConfig.FixedIntervalinsteadCreate a newDateHistogramGroupConfigusing the given field and interval parameters.- 从以下版本开始:
- 7.2.0
-
DateHistogramGroupConfig
@Deprecated public DateHistogramGroupConfig(java.lang.String field, org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval interval, @Nullable org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval delay, @Nullable java.lang.String timeZone)已过时。Build a DateHistoConfig usingDateHistogramGroupConfig.CalendarIntervalorDateHistogramGroupConfig.FixedIntervalinsteadCreate a newDateHistogramGroupConfigusing the given configuration parameters.The
fieldandintervalare required to compute the date histogram for the rolled up documents. Thedelayis optional and can be set tonull. It defines how long to wait before rolling up new documents. ThetimeZoneis optional and can be set tonull. When configured, the time zone value is resolved using (DateTimeZone.forID(String)and must match a time zone identifier provided by the Joda Time library.- 参数:
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). Whennull, the UTC timezone is used.- 从以下版本开始:
- 7.2.0
-
-
方法详细资料
-
validate
从接口复制的说明:ValidatablePerform validation. This method does not have to be overridden in the event that no validation needs to be done, or the validation was done during object construction time. AValidationExceptionthat is not null is assumed to contain validation errors and will be thrown.- 指定者:
validate在接口中Validatable- 返回:
- An
OptionalValidationExceptionthat contains a list of validation errors.
-
getField
public java.lang.String getField()Get the date field -
getInterval
public org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval getInterval()Get the date interval -
getDelay
public org.easysearch.search.aggregations.bucket.histogram.DateHistogramInterval getDelay()Get the time delay for this histogram -
getTimeZone
public java.lang.String getTimeZone()Get the timezone to apply -
toXContent
public org.easysearch.common.xcontent.XContentBuilder toXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- 指定者:
toXContent在接口中org.easysearch.common.xcontent.ToXContent- 抛出:
java.io.IOException
-
equals
public boolean equals(java.lang.Object other)- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()- 覆盖:
hashCode在类中java.lang.Object
-
fromXContent
public static DateHistogramGroupConfig fromXContent(org.easysearch.common.xcontent.XContentParser parser) throws java.io.IOException- 抛出:
java.io.IOException
-
DateHistogramGroupConfig.CalendarIntervalorDateHistogramGroupConfig.FixedIntervalinstead