@StableMinor(version="12.3", sinceVersion="11.0") public class DateRangeAggregation extends AbstractSubAggregationAwareAggregation
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 |
---|---|
DocumentTypeField |
getField()
Returns the field this aggregation is bound to.
|
String |
getId()
Returns the aggregation identifier.
|
List<Range<T>> |
getRanges()
Returns the ranges.
|
addSubAggregation, addSubAggregations, addSubAggregations, getSubAggregations
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 String getId()
IAggregation
getId
in interface IAggregation
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.