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="16.1", 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: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
id
-
Constructor Summary
Constructors Constructor Description TermsAggregation(java.lang.String id, DocumentTypeField field)
Creates a new instance.TermsAggregation(java.lang.String id, DocumentTypeField field, java.lang.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.java.lang.String
getId()
Returns the aggregation identifier.java.lang.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(java.lang.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
-
-
-
-
Constructor Detail
-
TermsAggregation
public TermsAggregation(java.lang.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(java.lang.String id, DocumentTypeField field, java.lang.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(java.lang.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 java.lang.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 java.lang.String getId()
Description copied from interface:IAggregation
Returns the aggregation identifier.- Specified by:
getId
in interfaceIAggregation
- Returns:
- the aggregation identifier.
-
-