Making index.max_result_window setting persistent


(Pavan) #1

Is there a way to make index.max_result_window setting persistent.
Also what are the available options to push this setting.

Thanks,
Pavan


(Daniel Mitterdorfer) #2

Hi @pavang6,

you can use an index template for this:

PUT /_template/my_global_template
{
  "template": "*",
  "order": 0,
  "settings": {
    "max_result_window": 20000
  }
}

By specifying this template, all indices that created afterwards will have this setting (but none of the preexisting ones).

Also be aware that you can run into memory problems if you increase max_result_window to a much higher value.

Daniel


(Pavan) #3

Thank you Daniel.

Let say if i increase the count to 1000000 considering the extreme case which will never happen. Will that have an impact on memory even if all my search requests have size value less than 20000.


(Daniel Mitterdorfer) #4

Hi @pavang6,

it will only have an impact if you have an actual search request that really retrieves that many hits.

Daniel


(Pavan) #5

Thanks very much !

Pavan


(system) #6