Class TermsAggregation

    • Field Detail

      • id

        protected final java.lang.String id
    • Constructor Detail

      • TermsAggregation

        public TermsAggregation​(java.lang.String id,
                                DocumentTypeField field)
        Creates a new instance. Uses null as the size.
        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 to 0, it is assumed to be unlimited.
        Since:
        9.0.0
    • Method Detail

      • getSize

        public int getSize()
        Description copied from interface: ISizeAwareAggregation
        Returns the number of buckets to be returned in aggregation.
        Specified by:
        getSize in interface ISizeAwareAggregation
        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 interface IAggregation
        Returns:
        the aggregation identifier.