# Ridiculously long Scroll\_id

**URL:** <https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913>\
**Category:** Elasticsearch\
**Created:** [July 24, 2013, 12:50am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913 "2013-07-24T00:50:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Chung](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Scott\_Chung](https://discuss.elastic.co/u/Scott_Chung)\
**Post date:** [July 24, 2013, 12:50am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/1 "2013-07-24T00:50:41Z")

</div>

Does Scroll\_id get longer with the number of shards? I have 500 shards (for  
using custom routing and speeding up search queries), and I when I tried to  
do a scan search, I got back a scroll\_id of length 20708.

My guess is that this is because the scroll\_id is some id for each shard  
concatenated together. (Is my guess completely off?) Is there a way to make  
each shard use the same id, or have a table that translates a public  
scroll\_id that's returned to one that's used internally?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Oli\_McCormack](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@Oli\_McCormack](https://discuss.elastic.co/u/Oli_McCormack)\
**Post date:** [July 24, 2013, 1:20am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/2 "2013-07-24T01:20:22Z")

</div>

The scroll id is a base64 encoded string, that I believe does have  
information relating to your shards.

Decode it to see its contents.  
On Jul 23, 2013 5:50 PM, "Scott Chung" [scottc52@gmail.com](mailto:scottc52@gmail.com) wrote:

> Does Scroll\_id get longer with the number of shards? I have 500 shards  
> (for using custom routing and speeding up search queries), and I when I  
> tried to do a scan search, I got back a scroll\_id of length 20708.
> 
> My guess is that this is because the scroll\_id is some id for each shard  
> concatenated together. (Is my guess completely off?) Is there a way to make  
> each shard use the same id, or have a table that translates a public  
> scroll\_id that's returned to one that's used internally?
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Scott\_Chung](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Scott\_Chung](https://discuss.elastic.co/u/Scott_Chung)\
**Post date:** [July 24, 2013, 1:31am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/3 "2013-07-24T01:31:45Z")

</div>

When I decode the scroll id, I get the following:

"scan;500;1607138:Ah5ZV4RiRRmr3OjrrZB48A;1661193:3FbURZzHT3-XHuYGQCRQ3g;1636318:NbHVKbL2TJedKQI8ejKA2g;1607139:Ah5ZV4RiRRmr3OjrrZB48A;1713931:-1U8JPQ0TvGk8XX\_6dGp\_A;...."

So, my guess is this is "scan; {# of shards};  
{shard\_id\_1}:{corresponding\_scroll\_id\_1}; {shard\_id\_2}:{corresponding\_scroll\_id\_2};  
..."  
So, the scroll\_id grows linearly to the number of shards. In fact, for me,  
the scroll\_id is too large to pass as part of the url.  
Can we get a fix for this?

On Tuesday, July 23, 2013 6:20:22 PM UTC-7, Oli wrote:

> The scroll id is a base64 encoded string, that I believe does have  
> information relating to your shards.
> 
> Decode it to see its contents.  
> On Jul 23, 2013 5:50 PM, "Scott Chung" \<[scot...@gmail.com](mailto:scot...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Does Scroll\_id get longer with the number of shards? I have 500 shards  
> > (for using custom routing and speeding up search queries), and I when I  
> > tried to do a scan search, I got back a scroll\_id of length 20708.
> > 
> > My guess is that this is because the scroll\_id is some id for each shard  
> > concatenated together. (Is my guess completely off?) Is there a way to make  
> > each shard use the same id, or have a table that translates a public  
> > scroll\_id that's returned to one that's used internally?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [July 24, 2013, 4:29am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/4 "2013-07-24T04:29:16Z")

</div>

You don't have to pass it as part of the url. You can simply send it in the  
request body  
([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/search-type/)).

On Tuesday, July 23, 2013 9:31:45 PM UTC-4, Scott Chung wrote:

> When I decode the scroll id, I get the following:
> 
> "scan;500;1607138:Ah5ZV4RiRRmr3OjrrZB48A;1661193:3FbURZzHT3-XHuYGQCRQ3g;1636318:NbHVKbL2TJedKQI8ejKA2g;1607139:Ah5ZV4RiRRmr3OjrrZB48A;1713931:-1U8JPQ0TvGk8XX\_6dGp\_A;...."
> 
> So, my guess is this is "scan; {# of shards};  
> {shard\_id\_1}:{corresponding\_scroll\_id\_1}; {shard\_id\_2}:{corresponding\_scroll\_id\_2};  
> ..."  
> So, the scroll\_id grows linearly to the number of shards. In fact, for me,  
> the scroll\_id is too large to pass as part of the url.  
> Can we get a fix for this?
> 
> On Tuesday, July 23, 2013 6:20:22 PM UTC-7, Oli wrote:
> 
> > The scroll id is a base64 encoded string, that I believe does have  
> > information relating to your shards.
> > 
> > Decode it to see its contents.  
> > On Jul 23, 2013 5:50 PM, "Scott Chung" [scot...@gmail.com](mailto:scot...@gmail.com) wrote:
> > 
> > > Does Scroll\_id get longer with the number of shards? I have 500 shards  
> > > (for using custom routing and speeding up search queries), and I when I  
> > > tried to do a scan search, I got back a scroll\_id of length 20708.
> > > 
> > > My guess is that this is because the scroll\_id is some id for each shard  
> > > concatenated together. (Is my guess completely off?) Is there a way to make  
> > > each shard use the same id, or have a table that translates a public  
> > > scroll\_id that's returned to one that's used internally?
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Scott\_Chung](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Scott\_Chung](https://discuss.elastic.co/u/Scott_Chung)\
**Post date:** [July 24, 2013, 5:51pm UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/5 "2013-07-24T17:51:19Z")

</div>

Yes, that is what I ended up doing. (In case anybody's also using Nest and  
runs into this trouble. You can use the "searchRaw" method to trick the  
client into parsing the results for you.)  
But, it's still not really desirable to be passing really long ID's around.

On Tuesday, July 23, 2013 9:29:16 PM UTC-7, Igor Motov wrote:

> You don't have to pass it as part of the url. You can simply send it in  
> the request body (  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/search-type/)).
> 
> On Tuesday, July 23, 2013 9:31:45 PM UTC-4, Scott Chung wrote:
> 
> > When I decode the scroll id, I get the following:
> > 
> > "scan;500;1607138:Ah5ZV4RiRRmr3OjrrZB48A;1661193:3FbURZzHT3-XHuYGQCRQ3g;1636318:NbHVKbL2TJedKQI8ejKA2g;1607139:Ah5ZV4RiRRmr3OjrrZB48A;1713931:-1U8JPQ0TvGk8XX\_6dGp\_A;...."
> > 
> > So, my guess is this is "scan; {# of shards};  
> > {shard\_id\_1}:{corresponding\_scroll\_id\_1}; {shard\_id\_2}:{corresponding\_scroll\_id\_2};  
> > ..."  
> > So, the scroll\_id grows linearly to the number of shards. In fact, for  
> > me, the scroll\_id is too large to pass as part of the url.  
> > Can we get a fix for this?
> > 
> > On Tuesday, July 23, 2013 6:20:22 PM UTC-7, Oli wrote:
> > 
> > > The scroll id is a base64 encoded string, that I believe does have  
> > > information relating to your shards.
> > > 
> > > Decode it to see its contents.  
> > > On Jul 23, 2013 5:50 PM, "Scott Chung" [scot...@gmail.com](mailto:scot...@gmail.com) wrote:
> > > 
> > > > Does Scroll\_id get longer with the number of shards? I have 500 shards  
> > > > (for using custom routing and speeding up search queries), and I when I  
> > > > tried to do a scan search, I got back a scroll\_id of length 20708.
> > > > 
> > > > My guess is that this is because the scroll\_id is some id for each  
> > > > shard concatenated together. (Is my guess completely off?) Is there a way  
> > > > to make each shard use the same id, or have a table that translates a  
> > > > public scroll\_id that's returned to one that's used internally?
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:24am UTC](https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/6 "2017-07-06T02:24:42Z")

</div>


