One bucket of an aggregation (facet) result - a distinct value found in the search results, together with how many documents matched it. Extends AggBucketHolder so a bucket can itself hold nested sub-aggregation buckets, for example a date-range bucket with a nested terms aggregation inside it.

Extends: AggBucketHolder


Properties

PropertyReturnsDescription
docCountLongNumber of documents in the search results that fall into this bucket.
keyStringRaw aggregation key for this bucket, as returned by the search backend - for example a term value, a date-range label, or a numeric bucket boundary.
textStringHuman-readable label for this bucket. Usually the same as the key, but callers may pass a separate display value when the key alone is not suitable to show to a user.

Methods

getDocCount()

Returns: Long

Number of documents in the search results that fall into this bucket.

getKey()

Returns: String

Raw aggregation key for this bucket, as returned by the search backend - for example a term value, a date-range label, or a numeric bucket boundary.

getText()

Returns: String

Human-readable label for this bucket. Usually the same as the key, but callers may pass a separate display value when the key alone is not suitable to show to a user.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.