# Reading from an alias which has two indexes

**URL:** <https://discuss.elastic.co/t/reading-from-an-alias-which-has-two-indexes/22987>\
**Category:** Elasticsearch\
**Created:** [March 30, 2015, 5:49pm UTC](https://discuss.elastic.co/t/reading-from-an-alias-which-has-two-indexes/22987 "2015-03-30T17:49:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumar\_S](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kumar\_S](https://discuss.elastic.co/u/Kumar_S)\
**Post date:** [March 30, 2015, 5:49pm UTC](https://discuss.elastic.co/t/reading-from-an-alias-which-has-two-indexes/22987/1 "2015-03-30T17:49:32Z")

</div>

Hi,  
If i have two indexes under an alias say "Old Index" and "New Index". the  
old index contains a doc identified by #doc1, version 1 and the i start  
populating "new index" (and stop writing to old index). I then index a  
updated version of #doc 1 to "New Index". Now "New Index" contains #doc1,  
version 2.

Now, when i issue a read query to the alias (which ahs Old & New Index  
under it), which version of the doc would it return, #doc 1, version 2?

Thanks for your prompt response.

Kumar Subramanian.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 1, 2015, 9:35pm UTC](https://discuss.elastic.co/t/reading-from-an-alias-which-has-two-indexes/22987/2 "2015-04-01T21:35:06Z")

</div>

It'd probably return both, depends on what your query is.

On 31 March 2015 at 04:49, Kumar S [krskumar108@gmail.com](mailto:krskumar108@gmail.com) wrote:

> Hi,  
> If i have two indexes under an alias say "Old Index" and "New Index". the  
> old index contains a doc identified by #doc1, version 1 and the i start  
> populating "new index" (and stop writing to old index). I then index a  
> updated version of #doc 1 to "New Index". Now "New Index" contains #doc1,  
> version 2.
> 
> Now, when i issue a read query to the alias (which ahs Old & New Index  
> under it), which version of the doc would it return, #doc 1, version 2?
> 
> Thanks for your prompt response.
> 
> Kumar Subramanian.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a2fecda7-2345-4a92-a94d-a68982bf4bd7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8OO-zV0G6nw%2BXf%2Bd171CYf2pwWF4oUow%2BFrjYta\_5HMA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8OO-zV0G6nw%2BXf%2Bd171CYf2pwWF4oUow%2BFrjYta_5HMA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:22am UTC](https://discuss.elastic.co/t/reading-from-an-alias-which-has-two-indexes/22987/3 "2017-07-06T00:22:13Z")

</div>


