0
votes

I am trying to insert records in multiple cluster (not nodes). I am making use of spring-data-elastic search(version 2.0.4.version). I have tried to create 2 elasticsearchoperation instances in configuration with different bean name. And i am trying to insert using that object with index(IndexQuery indexQuery) method. But when i am trying to insert i am not able to keep mapping of fields(non analyze field type). Can someone please help me how to keep mapping also when inserting entity to elasticsearch.

1

1 Answers

0
votes

Finally i was able to achieve it. I have created 2 instances of elasticsearchtemplate based on client instance, instead of elasticsearchoperations. And was able to insert to 2 different cluster.