Package lumis.portal.bigdata.query
Class DateRangeAggregation
- java.lang.Object
-
- lumis.portal.bigdata.query.AbstractSubAggregationAwareAggregation
-
- lumis.portal.bigdata.query.DateRangeAggregation
-
- All Implemented Interfaces:
IAggregation
,IFieldAwareAggregation
,IMultiBucketAggregation
,ISubAggregationAwareAggregation
@StableMinor(version="17.0", sinceVersion="11.0") public class DateRangeAggregation extends AbstractSubAggregationAwareAggregation
Date range aggregation. Produces buckets for each interval in histogram. This aggregation produces anIDateRangeAggregationResult
.- Since:
- 11.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
id
-
Constructor Summary
Constructors Constructor Description DateRangeAggregation(java.lang.String id, DocumentTypeField field, java.util.Date startDate, java.util.Date endDate, int numRanges)
Creates a newDateRangeAggregation
that receives a start date (startDate
), an end date (endDate
) and a number of ranges to be produced (numRanges
).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentTypeField
getField()
Returns the field this aggregation is bound to.java.lang.String
getId()
Returns the aggregation identifier.java.util.List<Range<T>>
getRanges()
Returns the ranges.-
Methods inherited from class lumis.portal.bigdata.query.AbstractSubAggregationAwareAggregation
addSubAggregation, addSubAggregations, addSubAggregations, getSubAggregations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.bigdata.query.IAggregation
getId
-
-
-
-
Constructor Detail
-
DateRangeAggregation
public DateRangeAggregation(java.lang.String id, DocumentTypeField field, java.util.Date startDate, java.util.Date endDate, int numRanges)
Creates a newDateRangeAggregation
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 abucket
(that will have the upper limit of the range as its key).- Parameters:
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.- Since:
- 11.0.0
-
-
Method Detail
-
getRanges
public java.util.List<Range<T>> getRanges()
Returns the ranges.- Returns:
- the ranges.
- Since:
- 11.0.0
-
getField
public DocumentTypeField getField()
Description copied from interface:IFieldAwareAggregation
Returns the field this aggregation is bound to.- Specified by:
getField
in interfaceIFieldAwareAggregation
- Returns:
- the field this aggregation is bound to.
-
getId
public java.lang.String getId()
Description copied from interface:IAggregation
Returns the aggregation identifier.- Specified by:
getId
in interfaceIAggregation
- Returns:
- the aggregation identifier.
-
-