Interface TermsAggregationOptionsStep<S extends TermsAggregationOptionsStep<?,​PDF,​F,​A>,​PDF extends SearchPredicateFactory,​F,​A>

    • Method Detail

      • orderByCountDescending

        S orderByCountDescending()
        Order buckets by descending document count in the aggregation result.

        This is the default behavior.

        Returns:
        this, for method chaining.
      • orderByCountAscending

        S orderByCountAscending()
        Order buckets by ascending document count in the aggregation result.
        Returns:
        this, for method chaining.
      • orderByTermAscending

        S orderByTermAscending()
        Order buckets by ascending term value in the aggregation result.
        Returns:
        this, for method chaining.
      • orderByTermDescending

        S orderByTermDescending()
        Order buckets by descending term value in the aggregation result.
        Returns:
        this, for method chaining.
      • minDocumentCount

        S minDocumentCount​(int minDocumentCount)
        Eliminates buckets with less than minDocumentCount matching documents from the aggregation result.

        If set to 0, terms that are present in the index, but are not referenced in any document matched by the search query will yield a bucket with a document count of zero.

        Defaults to 1.

        Parameters:
        minDocumentCount - The minimum document count for each aggregation value.
        Returns:
        this, for method chaining.
      • maxTermCount

        S maxTermCount​(int maxTermCount)
        Requires to only create buckets for the top maxTermCount most frequent terms.

        Defaults to 100.

        Parameters:
        maxTermCount - The maximum number of reported terms.
        Returns:
        this, for method chaining.