Class ElasticsearchJson.Bucket
- java.lang.Object
-
- org.apache.calcite.adapter.elasticsearch.ElasticsearchJson.Bucket
-
- All Implemented Interfaces:
ElasticsearchJson.Aggregation
,ElasticsearchJson.HasAggregations
- Enclosing class:
- ElasticsearchJson
static class ElasticsearchJson.Bucket extends java.lang.Object implements ElasticsearchJson.HasAggregations, ElasticsearchJson.Aggregation
A bucket represents a criteria to which all documents that fall in it adhere to. It is also uniquely identified by a key, and can potentially hold sub-aggregations computed over all documents in it.
-
-
Field Summary
Fields Modifier and Type Field Description private ElasticsearchJson.Aggregations
aggregations
private java.lang.Object
key
private java.lang.String
name
-
Constructor Summary
Constructors Constructor Description Bucket(java.lang.Object key, java.lang.String name, ElasticsearchJson.Aggregations aggregations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElasticsearchJson.Aggregations
getAggregations()
java.lang.String
getName()
(package private) boolean
hasNoAggregations()
Means current bucket has no aggregations.(package private) java.lang.Object
key()
(package private) java.lang.String
keyAsString()
-
-
-
Field Detail
-
key
private final java.lang.Object key
-
name
private final java.lang.String name
-
aggregations
private final ElasticsearchJson.Aggregations aggregations
-
-
Constructor Detail
-
Bucket
Bucket(java.lang.Object key, java.lang.String name, ElasticsearchJson.Aggregations aggregations)
-
-
Method Detail
-
key
java.lang.Object key()
- Returns:
- The key associated with the bucket
-
keyAsString
java.lang.String keyAsString()
- Returns:
- The key associated with the bucket as a string
-
hasNoAggregations
boolean hasNoAggregations()
Means current bucket has no aggregations.
-
getAggregations
public ElasticsearchJson.Aggregations getAggregations()
- Specified by:
getAggregations
in interfaceElasticsearchJson.HasAggregations
- Returns:
- The sub-aggregations of this bucket
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceElasticsearchJson.Aggregation
- Returns:
- The name of this aggregation.
-
-