Elasticsearch query not returning _scroll_id for scroll query

We have an Elasticsearch cluster which all seems to be working fine except that scrolling does not work. When I do a query with a ?scroll=1m querystring no _scroll_id is returned in the results.

To check if it was anything to do with the existing Indexes I created a new Index:

PUT scroll_test

POST scroll_test/1
{
    "foo": "bar"
}

POST scroll_test/2
{
    "foo": "baz"
}

POST /scroll_test/_search?scroll=1m
{
    "size": 1, 
    "query": {
        "match_all": {}
    }
}

returns

{
   "took": 2,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "hits": {
      "total": 3,
      "max_score": 1,
      "hits": [
         {
            "_index": "scroll_test",
            "_type": "1",
            "_id": "AV0N_R0jl33mdjPtW4uQ",
            "_score": 1,
            "_source": {
               "foo": "bar"
            }
         }
      ]
   }
}

I use the chrome Sense plugin and also the NEST .NET nuget package and scrolling doesn't work in either.

We have just done a rolling upgrade from v5.2 to v5.4.3 (cluster health is now green). Scrolling still does not work after upgrading to v5.4.3. I am able to execute scrolling queries when running Elasticsearch locally.

when you say locally what do you mean exactly? Are you talking to ES directly when you the node or is there a proxy in between? have you tried to set scroll: "1m" in the request body?

Sorry, yes. I have ElasticSearch installed locally on my Windows 10 machine and scrolling is working as expected. However, scrolling isn't working (or throwing an error) on our cluster in AWS.

I've tried specifying scroll in the querystring and the request body, but unfortunately with no difference.

Ah, I've just found out that it might be something to do with how we've set up the cluster in AWS. If I make a request directly to an individual node it does scroll correctly, so I think it might be the configuration of nginx which we use as a reverse proxy.

POST /scroll_test/_search
{
   "scroll" : "1m",
    "size": 1, 
    "query": {
        "match_all": {}
    }
}

did you try this ^^

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