title: Scan And Scroll Query In ElasticSearch
body: <p>I am using ES 1.5 version, I used the scroll query, id ,I ts working fine and returning the scroll id</p>
  
  <blockquote>
    <p>GET /ecommerce_parts/_search?search_type=scan&amp;scroll=3m</p>
  </blockquote>
  
  <pre><code>{
  "query": { "match_all": {}},
  "size": 1000
  }
  
  {
  "scrollid": "c2Nhbjs1OzE4Okk4ckVkSld0UXdDU212UU1kNWZBU1E7MTc6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsxNjpJOHJFZEpXdFF3Q1NtdlFNZDVmQVNROzIwOkk4ckVkSld0UXdDU212UU1kNWZBU1E7MTk6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsxO3RvdGFsX2hpdHM6MTg0NjEwOw==",
  "took": 1,
  "timed_out": false,
  "_shards": {
  "total": 5,
  "successful": 5,
  "failed": 0
  },
  "hits": {
  "total": 184610,
  "max_score": 0,
  "hits": []
  }
  }
  </code></pre>
  
  <p>Now when I passing the scroll id to retrieve the set of documents its throwing an error</p>
  
  <blockquote>
    <p>GET /_search/scroll?scroll=1m 
    c2Nhbjs1OzE4Okk4ckVkSld0UXdDU212UU1kNWZBU1E7MTc6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsxNjpJOHJFZEpXdFF3Q1NtdlFNZDVmQVNROzIwOkk4ckVkSld0UXdDU212UU1kNWZBU1E7MTk6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsxO3RvdGFsX2hpdHM6MTg0NjEwOw==</p>
  </blockquote>
  
  <pre><code>{
  "error": "ElasticsearchIllegalArgumentException[Malformed scrollId []]",
  "status": 400
  }
  </code></pre>
  
  <blockquote>
    <p>GET
    /_search/scroll?scroll=3mc2Nhbjs1OzIzOkk4ckVkSld0UXdDU212UU1kNWZBU1E7MjE6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsyNTpJOHJFZEpXdFF3Q1NtdlFNZDVmQVNROzI0Okk4ckVkSld0UXdDU212UU1kNWZBU1E7MjI6SThyRWRKV3RRd0NTbXZRTWQ1ZkFTUTsxO3RvdGFsX2hpdHM6MTg0NjEwOw==</p>
  </blockquote>
  
  <p>Both of the above queries giving me an error how to retrieve the documents based on the scroll id, If m wrong please suggest a query</p>