# Replica or not?

**URL:** <https://discuss.elastic.co/t/replica-or-not/201372>\
**Category:** Elasticsearch\
**Created:** [September 27, 2019, 9:43am UTC](https://discuss.elastic.co/t/replica-or-not/201372 "2019-09-27T09:43:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![minddesigner](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@minddesigner](https://discuss.elastic.co/u/minddesigner)\
**Post date:** [September 27, 2019, 9:43am UTC](https://discuss.elastic.co/t/replica-or-not/201372/1 "2019-09-27T09:43:10Z")

</div>

Hello,

I am new and I have a question

I have an application that puts data into an 'A' index that can be read by users

In case of human errors (wrong algorithm), I end up with an index 'A' with bad data

I would like to put this data on another 'A2' index

Validate if everything went well:  
if I validate: switch 'A2' to 'A' and 'A' to 'A2', users have new data  
if I do not validate: do not switch, users still have the right data

When I say "switch", it means that the application is careful to choose the right index, I do not migrate the data

Before implementing this, I want to know if the notion of replica indexes can fill my need or if it is something completely internal that is there in case of failure

thank you

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [September 27, 2019, 12:09pm UTC](https://discuss.elastic.co/t/replica-or-not/201372/2 "2019-09-27T12:09:43Z")

</div>

> [@minddesigner](#):
>
> Before implementing this, I want to know if the notion of replica indexes can fill my need

I think not, because there is no way to arrange for a replica to have different content from the primary.

But you might be interested in [aliases](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html) which add a layer of indirection that would let you transparently redirect users to a different index.

---

<div class="post-metadata">

**Author:** ![minddesigner](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@minddesigner](https://discuss.elastic.co/u/minddesigner)\
**Post date:** [September 27, 2019, 12:13pm UTC](https://discuss.elastic.co/t/replica-or-not/201372/3 "2019-09-27T12:13:16Z")

</div>

Thank you for your quick reply

I will look at the aliases

---

<div class="post-metadata">

**Author:** ![minddesigner](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@minddesigner](https://discuss.elastic.co/u/minddesigner)\
**Post date:** [September 27, 2019, 12:41pm UTC](https://discuss.elastic.co/t/replica-or-not/201372/4 "2019-09-27T12:41:25Z")

</div>

The aliases work for me

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2019, 12:41pm UTC](https://discuss.elastic.co/t/replica-or-not/201372/5 "2019-10-25T12:41:27Z")

</div>

Closed on October 25, 2019, 12:41pm UTC

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