Can we connect to multiple clusters in JAVA using High level rest client

Hi team,
I have a question about high level rest client
lets suppose
I have 2 clusters running on two different machines and those clusters have an index with the same name. I have a Java application which fetches data from a single cluster using HLRC. Now I want to connect to both the clusters and want to fire API calls to them so that it can fetch the data from both the indexes on different machines. So can a single client instance connect to multiple clusters and fire a query which fetches data from both the clusters and I also want the combined results of both the request in a single response.

Is this at all possible and if not what can be my best approach to this?

As far as my understanding is you cannot do this in the client and you need two separate instances.

An alternative may be to use CCS - Search across clusters | Elasticsearch Guide [8.7] | Elastic

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