I have inherited some old RestHighLevelClient code (7.16.3) which I wish to upgrade to the new ElasticsearchClient. I am stumped on how to upgrade the following code:
AggregationBuilder ab = AggregationBuilders.composite("rootAggregation", valuesSourceBuilders);
ab.subAggregation(AggregationBuilders.stats('statsAggregation').field('time'));
My problem is how to turn the above into the new Builder based pattern. Please don't respond with a DSL example, I want to use the Builders directly for now
Thank youy