Aggregration through Java High Level Rest Client

(Teddy) #1

I need to perform aggregations on multiple index through Java.

RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(new HttpHost("localhost",9200,"http")));
		SearchRequest searchRequest = new SearchRequest();
		SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
		SearchResponse searchResponse =;

I have tried the above but dont know how to perform the same on multiple Index.

(David Pilato) #2

From the code you pasted, you are already running that on all indices.

(Teddy) #3


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.