Sync 2 indices in the same cluster

Hello!

Is there a way to keep in sync two elasticsearch indices?
Whatever is written by the app in one index, to be copied in a second index.
It is not a viable solution to make the app writing at the same time to both indices(or to kafka).

Thanks!

As far as I know there is nothing to support this within Elasticsearch.

This is what I would have suggested. Why is this not an option?

Is that within the same cluster? Otherwise look at Cross-cluster replication | Elasticsearch Guide [8.13] | Elastic

1 Like

Hello! Thank you for your answers.

It is not an option for now because it would imply pretty high additional hardware costs.

It is in the same cluster.

Thanks

So what's the use case? May be we can suggest another solution to solve this.

When we create a connector, let's say postgresql for example , the index is defined by default and i didn't see option to add a custom index over a connector.

Is this default behavior that the index is preconfigured?
As I need a different index over the same connector, I am not able to find any such way to do this. If I have to reindex again and again that would simply be a overhead of syncing docs between indexes.

I am a beginner and any kind of help is appreciated.

Thank you.

Short answer: use an alias. That's immediate.
I believe that you can set the index name you want but I'm not that familiar with the connectors.

1 Like