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
| Property | Returns | Description |
|---|---|---|
| aggName | String | The name of the aggregation this bucket belongs to, matching the owning facet's name. |
| buckets | List<FacetBucket> | The sub-buckets nested under this term, for a further level of aggregation. Null if none have been added. |
| termName | String | The term value this bucket represents, typically an aggregation key or entity id. |
| termTitle | String | The 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.
| Parameter | Description |
|---|---|
aggName | the name of the aggregation the sub-bucket belongs to |
name | the term value the sub-bucket represents |
title | the display title for the term |
count | the number of documents matching this term |