# Scan and Scroll 100 Index Limit

**URL:** <https://discuss.elastic.co/t/scan-and-scroll-100-index-limit/29819>\
**Category:** Elasticsearch\
**Created:** [September 23, 2015, 1:01am UTC](https://discuss.elastic.co/t/scan-and-scroll-100-index-limit/29819 "2015-09-23T01:01:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![voipoclay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voipoclay/32/4372_2.png) [@voipoclay](https://discuss.elastic.co/u/voipoclay)\
**Post date:** [September 23, 2015, 10:55pm UTC](https://discuss.elastic.co/t/scan-and-scroll-100-index-limit/29819/4 "2015-09-23T22:55:26Z")

</div>

found the answer to my own question.

Following the api at the following link [https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/\_search\_operations.html#\_scan\_scroll](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/_search_operations.html#_scan_scroll) ... I found that using scroll\_id in the URI became too long in the while loop so it didn't work once indices reached a certain size.

Specifying it the way the docs say to makes it a GET request and therefore eventually truncates the request URI. I just removed it and made the body attribute the scroll\_id and then it converted it to a POST request and problem solved.

```
             try {
                 // Execute a Scroll request
                 $response = $this->elastic->scroll(
                     array(
                         //"scroll_id" => $scroll_id, //...using our previously obtained _scroll_id
                         "scroll" => "15s", // and the same timeout window
                         "body" => $scroll_id
                     )   
                 );  
             } catch (\Exception $e) {
                 var_dump($e->getMessage());
             }   

```

Adding this here for anyone else who encounters this.

---

_[View the full topic](https://discuss.elastic.co/t/scan-and-scroll-100-index-limit/29819)._
