Writeable
, ToXContent
, ToXContentFragment
public class DateHistogramValuesSourceBuilder extends CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
CompositeValuesSourceBuilder
that builds a RoundingValuesSource
from a Script
or
a field name using the provided interval.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
name
EMPTY_PARAMS
Modifier | Constructor | Description |
---|---|---|
|
DateHistogramValuesSourceBuilder(java.lang.String name) |
|
protected |
DateHistogramValuesSourceBuilder(StreamInput in) |
Modifier and Type | Method | Description |
---|---|---|
DateHistogramInterval |
dateHistogramInterval() |
Returns the date interval that is set on this source
|
DateHistogramValuesSourceBuilder |
dateHistogramInterval(DateHistogramInterval dateHistogramInterval) |
|
protected void |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
|
protected org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceConfig |
innerBuild(SearchContext context,
ValuesSourceConfig<?> config) |
Creates a
CompositeValuesSourceConfig for this source. |
protected boolean |
innerEquals(DateHistogramValuesSourceBuilder other) |
|
protected int |
innerHashCode() |
|
protected void |
innerWriteTo(StreamOutput out) |
|
long |
interval() |
Returns the interval in milliseconds that is set on this source
|
DateHistogramValuesSourceBuilder |
interval(long interval) |
Sets the interval on this source.
|
org.joda.time.DateTimeZone |
timeZone() |
Gets the time zone to use for this aggregation
|
DateHistogramValuesSourceBuilder |
timeZone(org.joda.time.DateTimeZone timeZone) |
Sets the time zone to use for this aggregation
|
java.lang.String |
type() |
build, equals, field, field, format, format, hashCode, missing, missing, name, order, order, order, script, script, toXContent, valueType, valueType, writeTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
public DateHistogramValuesSourceBuilder(java.lang.String name)
protected DateHistogramValuesSourceBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void innerWriteTo(StreamOutput out) throws java.io.IOException
innerWriteTo
in class CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
java.io.IOException
protected void doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
java.io.IOException
protected int innerHashCode()
innerHashCode
in class CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
protected boolean innerEquals(DateHistogramValuesSourceBuilder other)
innerEquals
in class CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
public java.lang.String type()
public long interval()
public DateHistogramValuesSourceBuilder interval(long interval)
interval()
and dateHistogramInterval()
are set,
then the dateHistogramInterval()
wins.public DateHistogramInterval dateHistogramInterval()
public DateHistogramValuesSourceBuilder dateHistogramInterval(DateHistogramInterval dateHistogramInterval)
public DateHistogramValuesSourceBuilder timeZone(org.joda.time.DateTimeZone timeZone)
public org.joda.time.DateTimeZone timeZone()
protected org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceConfig innerBuild(SearchContext context, ValuesSourceConfig<?> config) throws java.io.IOException
CompositeValuesSourceBuilder
CompositeValuesSourceConfig
for this source.innerBuild
in class CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
context
- The search context for this source.config
- The ValuesSourceConfig
for this source.java.io.IOException