public class DateHistogramValuesSourceBuilder extends CompositeValuesSourceBuilder<DateHistogramValuesSourceBuilder>
CompositeValuesSourceBuilder
that that builds a RoundingValuesSource
from a Script
or
a field name.Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
DateHistogramValuesSourceBuilder(StreamInput in) |
|
DateHistogramValuesSourceBuilder(java.lang.String name) |
Modifier and Type | Method and 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,
int pos,
int numPos,
org.apache.lucene.search.SortField sortField)
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, checkCanEarlyTerminate, equals, field, field, 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, int pos, int numPos, org.apache.lucene.search.SortField sortField) 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.pos
- The position of this source in the composite key.numPos
- The total number of positions in the composite key.sortField
- The SortField
of the index sort at this position or null if not present.java.io.IOException