# ScrollId doesn't advance with 2 indexes on a read alias 1.4.4

**URL:** <https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237>\
**Category:** Elasticsearch\
**Created:** [April 14, 2015, 5:26pm UTC](https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237 "2015-04-14T17:26:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_Nine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/todd_nine/32/778_2.png) [@Todd\_Nine](https://discuss.elastic.co/u/Todd_Nine)\
**Post date:** [April 14, 2015, 5:26pm UTC](https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237/1 "2015-04-14T17:26:55Z")

</div>

Hey guys,  
I have 2 indexes. I have a read alias on both of the indexes (A and B),  
and a write alias on 1 (B). I then insert 10 documents to the write alias  
which inserts them into index B. I perform the following query.

{  
"from" : 0,  
"size" : 1,  
"post\_filter" : {  
"bool" : {  
"must" : {  
"term" : {  
"edgeSearch" :  
"4cd2ba95-e2c9-11e4-bb39-c6c6eebe8d56\_application\_\_4cd2ba96-e2c9-11e4-bb39-c6c6eebe8d56\_owner\_\_users\_\_SOURCE"  
}  
}  
}  
},  
"sort" : [ {  
"fields.double" : {  
"order" : "asc",  
"nested\_filter" : {  
"term" : {  
"name" : "ordinal"  
}  
}  
}  
}, {  
"fields.long" : {  
"order" : "asc",  
"nested\_filter" : {  
"term" : {  
"name" : "ordinal"  
}  
}  
}  
}, {  
"fields.string.exact" : {  
"order" : "asc",  
"nested\_filter" : {  
"term" : {  
"name" : "ordinal"  
}  
}  
}  
}, {  
"fields.boolean" : {  
"order" : "asc",  
"nested\_filter" : {  
"term" : {  
"name" : "ordinal"  
}  
}  
}  
} ]  
}

I receive my first record, and a scroll id, as expected.

On my next request, I perform a request with the the scroll Id from the  
first response.

What I expect: I expect to receive my second record, and a new scrollId.

What I get: I get the first record again, with the same scroll Id.

I'm on a 1.4.4 server, with a 1.4.4 node client running locally integration  
testing.

When I use the same logic on a read alias with a single index, I do not  
experience this problem, so I'm reasonably certain my client is coded  
correctly.

Any ideas?

Thanks,  
Todd

--  
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/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@roger](https://discuss.elastic.co/u/roger)\
**Post date:** [April 14, 2015, 6:05pm UTC](https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237/2 "2015-04-14T18:05:59Z")

</div>

Are you sure that calling the same scroll\_id won't return the next results?

AFAIK, the scroll\_id can be the same and still return new records

2015-04-14 14:26 GMT-03:00 Todd Nine [tnine@apigee.com](mailto:tnine@apigee.com):

> Hey guys,  
> I have 2 indexes. I have a read alias on both of the indexes (A and B),  
> and a write alias on 1 (B). I then insert 10 documents to the write alias  
> which inserts them into index B. I perform the following query.
> 
> {  
> "from" : 0,  
> "size" : 1,  
> "post\_filter" : {  
> "bool" : {  
> "must" : {  
> "term" : {  
> "edgeSearch" :  
> "4cd2ba95-e2c9-11e4-bb39-c6c6eebe8d56\_application\_\_4cd2ba96-e2c9-11e4-bb39-c6c6eebe8d56\_owner\_\_users\_\_SOURCE"  
> }  
> }  
> }  
> },  
> "sort" : [ {  
> "fields.double" : {  
> "order" : "asc",  
> "nested\_filter" : {  
> "term" : {  
> "name" : "ordinal"  
> }  
> }  
> }  
> }, {  
> "fields.long" : {  
> "order" : "asc",  
> "nested\_filter" : {  
> "term" : {  
> "name" : "ordinal"  
> }  
> }  
> }  
> }, {  
> "fields.string.exact" : {  
> "order" : "asc",  
> "nested\_filter" : {  
> "term" : {  
> "name" : "ordinal"  
> }  
> }  
> }  
> }, {  
> "fields.boolean" : {  
> "order" : "asc",  
> "nested\_filter" : {  
> "term" : {  
> "name" : "ordinal"  
> }  
> }  
> }  
> } ]  
> }
> 
> I receive my first record, and a scroll id, as expected.
> 
> On my next request, I perform a request with the the scroll Id from the  
> first response.
> 
> What I expect: I expect to receive my second record, and a new scrollId.
> 
> What I get: I get the first record again, with the same scroll Id.
> 
> I'm on a 1.4.4 server, with a 1.4.4 node client running locally  
> integration testing.
> 
> When I use the same logic on a read alias with a single index, I do not  
> experience this problem, so I'm reasonably certain my client is coded  
> correctly.
> 
> Any ideas?
> 
> Thanks,  
> Todd
> 
> --  
> 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/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%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/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Todd\_Nine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/todd_nine/32/778_2.png) [@Todd\_Nine](https://discuss.elastic.co/u/Todd_Nine)\
**Post date:** [April 14, 2015, 6:08pm UTC](https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237/3 "2015-04-14T18:08:47Z")

</div>

Correct, I'm always getting the first entity back with the scroll id. This  
doesn't happen if I remove index A from the alias. I then get the results  
I expect.

On Tue, Apr 14, 2015 at 12:05 PM, Roger de Cordova Farias \<  
roger.farias@fontec.inf.br\> wrote:

> Are you sure that calling the same scroll\_id won't return the next results?
> 
> AFAIK, the scroll\_id can be the same and still return new records
> 
> 2015-04-14 14:26 GMT-03:00 Todd Nine [tnine@apigee.com](mailto:tnine@apigee.com):
> 
> > Hey guys,  
> > I have 2 indexes. I have a read alias on both of the indexes (A and  
> > B), and a write alias on 1 (B). I then insert 10 documents to the write  
> > alias which inserts them into index B. I perform the following query.
> > 
> > {  
> > "from" : 0,  
> > "size" : 1,  
> > "post\_filter" : {  
> > "bool" : {  
> > "must" : {  
> > "term" : {  
> > "edgeSearch" :  
> > "4cd2ba95-e2c9-11e4-bb39-c6c6eebe8d56\_application\_\_4cd2ba96-e2c9-11e4-bb39-c6c6eebe8d56\_owner\_\_users\_\_SOURCE"  
> > }  
> > }  
> > }  
> > },  
> > "sort" : [ {  
> > "fields.double" : {  
> > "order" : "asc",  
> > "nested\_filter" : {  
> > "term" : {  
> > "name" : "ordinal"  
> > }  
> > }  
> > }  
> > }, {  
> > "fields.long" : {  
> > "order" : "asc",  
> > "nested\_filter" : {  
> > "term" : {  
> > "name" : "ordinal"  
> > }  
> > }  
> > }  
> > }, {  
> > "fields.string.exact" : {  
> > "order" : "asc",  
> > "nested\_filter" : {  
> > "term" : {  
> > "name" : "ordinal"  
> > }  
> > }  
> > }  
> > }, {  
> > "fields.boolean" : {  
> > "order" : "asc",  
> > "nested\_filter" : {  
> > "term" : {  
> > "name" : "ordinal"  
> > }  
> > }  
> > }  
> > } ]  
> > }
> > 
> > I receive my first record, and a scroll id, as expected.
> > 
> > On my next request, I perform a request with the the scroll Id from the  
> > first response.
> > 
> > What I expect: I expect to receive my second record, and a new scrollId.
> > 
> > What I get: I get the first record again, with the same scroll Id.
> > 
> > I'm on a 1.4.4 server, with a 1.4.4 node client running locally  
> > integration testing.
> > 
> > When I use the same logic on a read alias with a single index, I do not  
> > experience this problem, so I'm reasonably certain my client is coded  
> > correctly.
> > 
> > Any ideas?
> > 
> > Thanks,  
> > Todd
> > 
> > --  
> > 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/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a317e5f-eb6f-4aef-a257-3902d31c3567%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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/2ZdScTQ6UkA/unsubscribe](https://groups.google.com/d/topic/elasticsearch/2ZdScTQ6UkA/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAJp2530z-FubTUaxd7rRUDLHahRD3SD1Dz1r7nhF9PJkycdsuA%40mail.gmail.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/CA%2Byzqf-T0uJKnB8fRBQ24Yda2Yp\_yGUYCJ4jvsqo4yyAb6NxRA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2Byzqf-T0uJKnB8fRBQ24Yda2Yp_yGUYCJ4jvsqo4yyAb6NxRA%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:19am UTC](https://discuss.elastic.co/t/scrollid-doesnt-advance-with-2-indexes-on-a-read-alias-1-4-4/23237/4 "2017-07-06T00:19:50Z")

</div>


