@StableMinor(version="11.0", sinceVersion="11.0") public class DateRangeAggregation extends Object
IDateRangeAggregationResult
.Constructor and Description |
---|
DateRangeAggregation(String id,
DocumentTypeField field,
Date startDate,
Date endDate,
int numRanges)
Creates a new
DateRangeAggregation that receives a start date (startDate ), an end date (endDate ) and a number of ranges to be produced (numRanges ). |
Modifier and Type | Method and Description |
---|---|
void |
addSubAggregation(IAggregation aggregation)
Adds the given sub-aggregation.
|
void |
addSubAggregations(IAggregation... aggregations)
Adds the given sub-aggregations.
|
void |
addSubAggregations(List<IAggregation> aggregations)
Adds the given sub-aggregations.
|
DocumentTypeField |
getField()
Returns the field this aggregation is bound to.
|
String |
getId()
Returns the aggregation identifier.
|
List<Range<T>> |
getRanges()
Returns the ranges.
|
List<IAggregation> |
getSubAggregations()
Returns an unmodifiable list of the sub-aggregations.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
protected final String id
public DateRangeAggregation(String id, DocumentTypeField field, Date startDate, Date endDate, int numRanges)
DateRangeAggregation
that receives a start date (startDate
), an end date (endDate
) and a number of ranges to be produced (numRanges
).
It splits the interval (from start date to end date) in ranges and each range will produce a bucket
(that will have the upper limit of the range as its key).id
- the aggregation identifier.field
- the aggregated field. Must be a date time field.startDate
- the start date.endDate
- the end date.numRanges
- the number of ranges to be produced.public DocumentTypeField getField()
IFieldAwareAggregation
getField
in interface IFieldAwareAggregation
public void addSubAggregation(IAggregation aggregation)
ISubAggregationAwareAggregation
addSubAggregation
in interface ISubAggregationAwareAggregation
public List<IAggregation> getSubAggregations()
ISubAggregationAwareAggregation
getSubAggregations
in interface ISubAggregationAwareAggregation
public void addSubAggregations(IAggregation... aggregations)
ISubAggregationAwareAggregation
addSubAggregations
in interface ISubAggregationAwareAggregation
aggregations
- the sub-aggregations.public void addSubAggregations(List<IAggregation> aggregations)
ISubAggregationAwareAggregation
addSubAggregations
in interface ISubAggregationAwareAggregation
aggregations
- the sub-aggregations.public String getId()
IAggregation
getId
in interface IAggregation
Lumisportal 11.0.0.180924 - Copyright © 2006–2018 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.