We are using Spring Data Elasticsearch Reactive Template
Query searchQuery = new NativeSearchQueryBuilder()
.withQuery(queryBuilder)
.withPageable(PageRequest.of(0, 10))
.addAggregation(AggregationBuilders.terms("categories").field("category"))
.build();
reactiveElasticsearchTemplate.search(searchQuery, documentType, IndexCoordinates.of(indexName))
In response we have Flux<SearchHit<T>> but there are no methods to retrieve aggregations.
How to retrieve the aggregations?