Код: Выделить всё
CompositeAggregationSource compositeAggregationSource = CompositeAggregationSource
.of(ca -> ca.terms(TermsAggregation.of(t -> t.field(Constants.name))));
Подробнее здесь: https://stackoverflow.com/questions/790 ... -elasticse
Код: Выделить всё
CompositeAggregationSource compositeAggregationSource = CompositeAggregationSource
.of(ca -> ca.terms(TermsAggregation.of(t -> t.field(Constants.name))));