How to use the same Elastic Search Index in Multiple Environments in same server

Im having 2 environments(Dev and Test) in a same server. I want to use the same set of Indices in both dev and Test. How to achieve this in Elasticsearch

Snapshot and restore might be the right tool for this?

Since Index Names are unique, how can i have 2 index with same name for 2 different environments

In a single cluster you can not. You either need to name the indices differently or have two Elasticsearch clusters.

i will be having different set of data in the same index for different environments(dev & test). if im creating 2 different clusters, if im adding/deleting some data in the index of Cluster1, then the same is getting reflected in cluster2 as well. How to handle this?

If they are 2 completely separate clusters use Cross Cluster Search or Replication depending on your desired outcome.

I'd probably start with Cross Cluster Search

How can i maintain different set of data in 2 different clusters so that i can use 1 cluster for dev environment and another cluster for test environment

You want to maintain 2 different sets of data but have changes relect in the other index? Are the two indices independent or not? I do not understand what you are trying to achieve here.

im migrating my sql server database to Elasticsearch. In SQL, im having 2 database with same set of tables. Both database is having different set of data, one database pointing to dev environment and other pointing to Testing Environment.

I want to achieve this in Elasticsearch as well.

For Dev Environment, I created 3 Index in Elasticsearch similar to 3 tables in SQL.
I want to have the same 3 index for test environment as well which will have different set of data.

Please let me know how i can achieve this scenario in Elasticsearch

You need to have 2 separate nodes/clusters if you want the index name to be the same but with different data.

i tried this. Im having a default cluster with 2 index and each having a set of records.
Now i have created a new cluster named "Cluster1". This new cluster "Cluster1" is also having the same set of records available in default cluster.

If im a deleting a document from an index in default cluster then the same gets deleted in Cluster1 as well.

Am i missing anything here?

Please share your configuration for the two clusters.

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