Class DateHistogramAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<DateHistogramAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<DateHistogramAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.DateHistogramAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<DateHistogramAggregation.Builder,,DateHistogramAggregation> MutableBuilder<DateHistogramAggregation.Builder,,DateHistogramAggregation> ObjectBuilder<DateHistogramAggregation>
- Enclosing class:
DateHistogramAggregation
public static class DateHistogramAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<DateHistogramAggregation.Builder>
implements CopyableBuilder<DateHistogramAggregation.Builder,DateHistogramAggregation>
Builder for
DateHistogramAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aDateHistogramAggregation.calendarInterval(CalendarInterval value) API name:calendar_intervalcopy()Create a new builderCopyableBuilderthat is a copy of this one.extendedBounds(Function<ExtendedBounds.Builder<FieldDateMath>, ObjectBuilder<ExtendedBounds<FieldDateMath>>> fn) API name:extended_boundsAPI name:extended_boundsAPI name:fieldAPI name:fixed_intervalfixedInterval(Time value) API name:fixed_intervalThe date format used to formatkey_as_stringin the response.hardBounds(Function<ExtendedBounds.Builder<FieldDateMath>, ObjectBuilder<ExtendedBounds<FieldDateMath>>> fn) API name:hard_boundshardBounds(ExtendedBounds<FieldDateMath> value) API name:hard_boundsAPI name:intervalAPI name:intervalSet totrueto associate a unique string key with each bucket and return the ranges as a hash rather than an array.minDocCount(Integer value) Only returns buckets that havemin_doc_countnumber of documents.API name:missingAPI name:offsetAPI name:offsetAPI name:orderorder(HistogramOrder value) API name:orderAPI name:paramsAPI name:paramsAPI name:scriptAPI name:scriptprotected DateHistogramAggregation.Builderself()API name:time_zoneMethods inherited from class org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, nameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<DateHistogramAggregation.Builder,DateHistogramAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<DateHistogramAggregation.Builder>
-
calendarInterval
@Nonnull public final DateHistogramAggregation.Builder calendarInterval(@Nullable CalendarInterval value) API name:calendar_interval -
extendedBounds
@Nonnull public final DateHistogramAggregation.Builder extendedBounds(@Nullable ExtendedBounds<FieldDateMath> value) API name:extended_bounds -
extendedBounds
@Nonnull public final DateHistogramAggregation.Builder extendedBounds(Function<ExtendedBounds.Builder<FieldDateMath>, ObjectBuilder<ExtendedBounds<FieldDateMath>>> fn) API name:extended_bounds -
field
API name:field -
fixedInterval
API name:fixed_interval -
fixedInterval
@Nonnull public final DateHistogramAggregation.Builder fixedInterval(Function<Time.Builder, ObjectBuilder<Time>> fn) API name:fixed_interval -
format
The date format used to formatkey_as_stringin the response. If noformatis specified, the first date format specified in the field mapping is used.API name:
format -
hardBounds
@Nonnull public final DateHistogramAggregation.Builder hardBounds(@Nullable ExtendedBounds<FieldDateMath> value) API name:hard_bounds -
hardBounds
@Nonnull public final DateHistogramAggregation.Builder hardBounds(Function<ExtendedBounds.Builder<FieldDateMath>, ObjectBuilder<ExtendedBounds<FieldDateMath>>> fn) API name:hard_bounds -
interval
API name:interval -
interval
@Nonnull public final DateHistogramAggregation.Builder interval(Function<Time.Builder, ObjectBuilder<Time>> fn) API name:interval -
keyed
Set totrueto associate a unique string key with each bucket and return the ranges as a hash rather than an array.API name:
keyed -
minDocCount
Only returns buckets that havemin_doc_countnumber of documents. By default, all buckets between the first bucket that matches documents and the last one are returned.API name:
min_doc_count -
missing
API name:missing -
offset
API name:offset -
offset
@Nonnull public final DateHistogramAggregation.Builder offset(Function<Time.Builder, ObjectBuilder<Time>> fn) API name:offset -
order
API name:order -
order
@Nonnull public final DateHistogramAggregation.Builder order(Function<HistogramOrder.Builder, ObjectBuilder<HistogramOrder>> fn) API name:order -
params
API name:paramsAdds all elements of
maptoparams. -
params
API name:paramsAdds an entry to
params. -
script
API name:script -
script
@Nonnull public final DateHistogramAggregation.Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn) API name:script -
timeZone
API name:time_zone -
build
Builds aDateHistogramAggregation.- Specified by:
buildin interfaceObjectBuilder<DateHistogramAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-