Elasticsearch : Unknown key for a VALUE_STRING in [scroll]

Elasticsearch scroll api gives me this error

{
   "error": {
      "root_cause": [
         {
            "type": "parsing_exception",
            "reason": "Unknown key for a VALUE_STRING in [scroll].",
            "line": 2,
            "col": 15
         }
      ],
      "type": "parsing_exception",
      "reason": "Unknown key for a VALUE_STRING in [scroll].",
      "line": 2,
      "col": 15
   },
   "status": 400
}

my code to get documents using scroll api is

GET index/type/_search?scroll=1m
{
    "size": 1000, 
   "query": {
      "match_all": {}
   }
}

this gives me nice result with "_scroll_id"

{
   "_scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAB1dFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdXxZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlRAAAAAAAAHV4WYlFub1RHeHhRQVNUcXNXV0kwem45UQAAAAAAAB1gFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdYhZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlR",
   "took": 37,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },

now according to the documentation I should do like this

GET /_search
{
    "scroll": "1m",
    "scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAB1dFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdXxZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlRAAAAAAAAHV4WYlFub1RHeHhRQVNUcXNXV0kwem45UQAAAAAAAB1gFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdYhZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlR"
}

and this is giving me above error. Am I using scroll api in a wrong way ? ES version is 5.5.1 and kibana version is 5.5.1. I am using kibana to access ES server.

Should be POST or GET /_search/scroll instead.

ah, that typo killed my two hours. Thanks for pointing that out

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.