A facet bucket for a single term (a discrete value such as a reward id or tag name), carrying the term's display title and, optionally, a nested list of sub-buckets for a further level of aggregation.

Extends: FacetBucket


Properties

PropertyReturnsDescription
aggNameStringThe name of the aggregation this bucket belongs to, matching the owning facet's name.
bucketsList<FacetBucket>The sub-buckets nested under this term, for a further level of aggregation. Null if none have been added.
termNameStringThe term value this bucket represents, typically an aggregation key or entity id.
termTitleStringThe display title for this bucket's term.

Methods

getAggName()

Returns: String

The name of the aggregation this bucket belongs to, matching the owning facet's name.

getTermName()

Returns: String

The term value this bucket represents, typically an aggregation key or entity id.

getTermTitle()

Returns: String

The display title for this bucket's term.

getBuckets()

Returns: List<FacetBucket>

The sub-buckets nested under this term, for a further level of aggregation. Null if none have been added.

addTermBucket(String aggName, String name, String title, long count)

Returns: TermFacetBucket

Creates a nested term bucket under this bucket and adds it to this bucket's sub-bucket list, creating that list if this is the first sub-bucket added.

ParameterDescription
aggNamethe name of the aggregation the sub-bucket belongs to
namethe term value the sub-bucket represents
titlethe display title for the term
countthe number of documents matching this term
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.