Elasticsearch multi cluster set up

We want to use multiple Elasticsearch cluster in our service, is there any way to automatically data is injected to specific cluster based on some parameter in bulk api without manually calling bulk api separately for each cluster.

As an example -> We have 2 separate Elasticsearch cluster ( E1 and E2 ) , Both containing similar indices. Based on the customer we want to inject the index data in particular elasticcluster.

currently we are planning to achieve this by custom logic but can we do this automatically ? can one bulk api connect to 2 different clusters ?

This is something you need to handle by custom logic. Each bulk request is sent to one node and it will be indexed into the cluster that node belongs to.

@Christian_Dahlqvist Thanks for clarifying.