Package lumis.portal.bigdata.query
Class TermsAggregation
- java.lang.Object
-
- lumis.portal.bigdata.query.AbstractSubAggregationAwareAggregation
-
- lumis.portal.bigdata.query.TermsAggregation
-
- All Implemented Interfaces:
IAggregation
,IFieldAwareAggregation
,IMultiBucketAggregation
,ISizeAwareAggregation
,ISubAggregationAwareAggregation
@StableMinor(version="14.0", sinceVersion="9.0") public class TermsAggregation extends AbstractSubAggregationAwareAggregation implements ISizeAwareAggregation, IFieldAwareAggregation
Aggregation that produces anITermsAggregationResult
. This aggregation splits the documents in the context inmultiple buckets
accordingly to their aggregated field value. This aggregation does not work with the following data types:- Since:
- 9.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description TermsAggregation(String id, DocumentTypeField field)
Creates a new instance.TermsAggregation(String id, DocumentTypeField field, Integer size)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentTypeField
getField()
Returns the field this aggregation is bound to.String
getId()
Returns the aggregation identifier.Long
getMinimumDocumentCount()
Returns the minimum document count a value should have in order to produce a bucket in responseint
getSize()
Returns the number of buckets to be returned in aggregation.TermsAggregation
setMinimunDocumentCount(Long minimunDocumentCount)
Sets the minimum document count a value should have in order to produce a bucket in response.-
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
-
-
-
-
Field Detail
-
id
protected final String id
-
-
Constructor Detail
-
TermsAggregation
public TermsAggregation(String id, DocumentTypeField field)
Creates a new instance. Usesnull
as thesize
.- Parameters:
id
- the aggregation identifier.field
- the field that aggregation will be performed on.- Since:
- 9.0.0
-
TermsAggregation
public TermsAggregation(String id, DocumentTypeField field, Integer size)
Creates a new instance.- Parameters:
id
- the aggregation identifier.field
- the field that aggregation will be performed on.size
- the result size of this aggregation (maximum number of buckets). When not defined, 10 is assumed as default. When set to0
, it is assumed to be unlimited.- Since:
- 9.0.0
-
-
Method Detail
-
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.
-
getSize
public int getSize()
Description copied from interface:ISizeAwareAggregation
Returns the number of buckets to be returned in aggregation.- Specified by:
getSize
in interfaceISizeAwareAggregation
- Returns:
- the number of buckets to be returned in aggregation.
-
setMinimunDocumentCount
public TermsAggregation setMinimunDocumentCount(Long minimunDocumentCount)
Sets the minimum document count a value should have in order to produce a bucket in response. Returns this aggregation for chaining commands.- Parameters:
minimunDocumentCount
- the minimum document count.- Returns:
- this aggregation.
- Since:
- 11.2.0
-
getMinimumDocumentCount
public Long getMinimumDocumentCount()
Returns the minimum document count a value should have in order to produce a bucket in response- Returns:
- the minimum document count a value should have in order to produce a bucket in response
- Since:
- 11.2.0
-
getId
public String getId()
Description copied from interface:IAggregation
Returns the aggregation identifier.- Specified by:
getId
in interfaceIAggregation
- Returns:
- the aggregation identifier.
-
-