Hi,
we have an ES cluster with 18 nodes: 15 data nodes and 3 master nodes. The cluster has around 750 indexes with 7 shards each, we are doing some scan&scroll searches to paginate the results and the bigger the search criteria is (and therefore the amount of shards impacted) the longer the scrollId is.
Now the problem is that when scrollId is too long we are getting an array_index_out_of_bounds_exception.
We are executing the queries in a java application using spring restTemplate but the error also happens sending the request via curl. Basically, a POST or GET request with an scrollId from around 4000 chars length works fine:
curl -XGET 'IP:9200/_search/scroll' -H 'Content-Type: application/json' -d'
{
"scroll" : "1m",
"scroll_id" : "cXVlcnlUaGVuRmV0Y2g7MTEyOzI1NzQ6aEtKN0tzanlTYkd0bWR3cFJUYzlMQTs2MjI6cEVtbHAxTGhSQVcyZnR2V1VsOXluZzs2MjM6cEVtbHAxTGhSQVcyZnR2V1VsOXluZzs0NDM6NGp5WWhTSlpUMHlSVjEtb3NPQXM1UTs2MjU6YlliRHBGRldSY0dicmM5WExVQ1J3UTs2MjY6VVZ2Wmp6VGJTWWVubFVpbTRiRWZHZzs2Mjc6VVZ2Wmp6VGJTWWVubFVpbTRiRWZHZzs2Mjg6VVZ2Wmp6VGJTWWVubFVpbTRiRWZHZzs0OTg6TE13amx6cjdTSGVLN3JEY3NGQlg3ZzszODc4OnIwNGVWa1NGUS1DenQ0M0JaOGZOR3c7NjI0OnBFbWxwMUxoUkFXMmZ0dldVbDl5bmc7NjI1OnBFbWxwMUxoUkFXMmZ0dldVbDl5bmc7NjI2OnBFbWxwMUxoUkFXMmZ0dldVbDl5bmc7MjUzOko2M3JHWXZpVHl5eExyTXFfbzlOcWc7NjI5OlVWdlpqelRiU1llbmxVaW00YkVmR2c7NjMwOlVWdlpqelRiU1llbmxVaW00YkVmR2c7MTQzOmE2dXpGQ3g2U3B5MzZIeW1uQnJXd3c7NjMxOlVWdlpqelRiU1llbmxVaW00YkVmR2c7NjMyOlVWdlpqelRiU1llbmxVaW00YkVmR2c7NjMzOlVWdlpqelRiU1llbmxVaW00YkVmR2c7NDM0OnY3bXhzMjg2UTI2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FRTWFwM3l5LVFCb05ydzs0MjQ6Ti1zcVVxd0FRTWFwM3l5LVFCb05ydzs2MzU6cEVtbHAxTGhSQVcyZnR2V1VsOXluZzs0MjM6Ti1zcVVxd0FRTWFwM3l5LVFCb05ydzs2MzY6cEVtbHAxTGhSQVcyZnR2V1VsOXluZzs2Mzc6cEVtbHAxTGhSQVcyZnR2V1VsOXluZzswOw"
}
'
But with a longer scrollId (we are getting scrollIds from around 9000 chars) we are getting following error:
"error" : {
"root_cause" : [ {
"type" : "array_index_out_of_bounds_exception",
"reason" : "267"
} ],
"type" : "array_index_out_of_bounds_exception",
"reason" : "267"
},
"status" : 500
}
We are using ES 2.2.1, at the very beginning I thought it was a limitation in the GET request but the same happens with a POST..
Any idea?
Thanks!
Cheers.
Matias