Interface Terms

All Superinterfaces:
Aggregation, MultiBucketsAggregation, ToXContent, ToXContentFragment
All Known Implementing Classes:
DoubleTerms, InternalMappedTerms, InternalTerms, LongTerms, ParsedDoubleTerms, ParsedLongTerms, ParsedStringTerms, ParsedTerms, StringTerms, UnmappedTerms

public interface Terms
extends MultiBucketsAggregation
A terms aggregation. Defines multiple bucket, each associated with a unique term for a specific field. All documents in a bucket has the bucket's term in that field.
  • Method Details

    • getBuckets

      java.util.List<? extends Terms.Bucket> getBuckets()
      Return the sorted list of the buckets in this terms aggregation.
      Specified by:
      getBuckets in interface MultiBucketsAggregation
      Returns:
      The buckets of this aggregation.
    • getBucketByKey

      Terms.Bucket getBucketByKey​(java.lang.String term)
      Get the bucket for the given term, or null if there is no such bucket.
    • getDocCountError

      long getDocCountError()
      Get an upper bound of the error on document counts in this aggregation.
    • getSumOfOtherDocCounts

      long getSumOfOtherDocCounts()
      Return the sum of the document counts of all buckets that did not make it to the top buckets.