Search with scroll parameter allows to exceed max_result_window

144 Views Asked by At

I'm using elasticsearch 2.4.0. My index settings are the following

settings: {
  index: {
    creation_date: "1506434142013",
    number_of_shards: "5",
    number_of_replicas: "1",
    uuid: "A8_ikspMQgu34QOb22aIdA",
    version: {
      created: "2040099"
    }
  }
}

So parameter max_result_window is set to 10000 (default value) When I'm performing such request

curl -XGET 'localhost:9200/index_name/_search?pretty' -d'
{
    "from" : 0, "size" : 100000
}
'

I get query_phase_execution_exception as from + size must be less than or equal to: [10000]. But when I do this thing

curl -XGET 'localhost:9200/index_name/_search?scroll=0m&pretty' -d'
{
    "from" : 0, "size" : 100000
}
'

I get no error and the request is performed. I was just wondering if it's okey as this behaviour is not declared.

P.S.such requests may cause out_of_memory_error if index is pretty large

0

There are 0 best solutions below