Class DateHistogramValuesSourceBuilder
- java.lang.Object
-
- org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
-
- org.elasticsearch.search.aggregations.bucket.composite.DateHistogramValuesSourceBuilder
-
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
public class DateHistogramValuesSourceBuilder extends CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
ACompositeValuesSourceBuilderthat builds aRoundingValuesSourcefrom aScriptor a field name using the provided interval.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder
name
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description DateHistogramValuesSourceBuilder(java.lang.String name)protectedDateHistogramValuesSourceBuilder(StreamInput in)
-
Method Summary
Modifier and Type Method Description DateHistogramIntervaldateHistogramInterval()Returns the date interval that is set on this sourceDateHistogramValuesSourceBuilderdateHistogramInterval(DateHistogramInterval dateHistogramInterval)protected voiddoXContentBody(XContentBuilder builder, ToXContent.Params params)protected org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceConfiginnerBuild(SearchContext context, ValuesSourceConfig<?> config)Creates aCompositeValuesSourceConfigfor this source.protected booleaninnerEquals(DateHistogramValuesSourceBuilder other)protected intinnerHashCode()protected voidinnerWriteTo(StreamOutput out)longinterval()Returns the interval in milliseconds that is set on this sourceDateHistogramValuesSourceBuilderinterval(long interval)Sets the interval on this source.java.time.ZoneIdtimeZone()Gets the time zone to use for this aggregationDateHistogramValuesSourceBuildertimeZone(java.time.ZoneId timeZone)Sets the time zone to use for this aggregationjava.lang.Stringtype()-
Methods inherited from class org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder
build, equals, field, field, format, format, hashCode, missingBucket, missingBucket, name, order, order, order, script, script, toXContent, valueType, valueType, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
DateHistogramValuesSourceBuilder
public DateHistogramValuesSourceBuilder(java.lang.String name)
-
DateHistogramValuesSourceBuilder
protected DateHistogramValuesSourceBuilder(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
innerWriteTo
protected void innerWriteTo(StreamOutput out) throws java.io.IOException
- Specified by:
innerWriteToin classCompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>- Throws:
java.io.IOException
-
doXContentBody
protected void doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
doXContentBodyin classCompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>- Throws:
java.io.IOException
-
innerHashCode
protected int innerHashCode()
- Specified by:
innerHashCodein classCompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
-
innerEquals
protected boolean innerEquals(DateHistogramValuesSourceBuilder other)
- Specified by:
innerEqualsin classCompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
-
type
public java.lang.String type()
-
interval
public long interval()
Returns the interval in milliseconds that is set on this source
-
interval
public DateHistogramValuesSourceBuilder interval(long interval)
Sets the interval on this source. If bothinterval()anddateHistogramInterval()are set, then thedateHistogramInterval()wins.
-
dateHistogramInterval
public DateHistogramInterval dateHistogramInterval()
Returns the date interval that is set on this source
-
dateHistogramInterval
public DateHistogramValuesSourceBuilder dateHistogramInterval(DateHistogramInterval dateHistogramInterval)
-
timeZone
public DateHistogramValuesSourceBuilder timeZone(java.time.ZoneId timeZone)
Sets the time zone to use for this aggregation
-
timeZone
public java.time.ZoneId timeZone()
Gets the time zone to use for this aggregation
-
innerBuild
protected org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceConfig innerBuild(SearchContext context, ValuesSourceConfig<?> config) throws java.io.IOException
Description copied from class:CompositeValuesSourceBuilderCreates aCompositeValuesSourceConfigfor this source.- Specified by:
innerBuildin classCompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>- Parameters:
context- The search context for this source.config- TheValuesSourceConfigfor this source.- Throws:
java.io.IOException
-
-