{"level":"DEBUG","time":"2023-11-22 12:53:27 +0000","message":" \u001b[1m\u001b[32mUsersIndex Search (106.5ms)\u001b[0m {:index=>["users"], :body=>{:size=>20000, :query=>{:bool=>{:must=>}}}}"}
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"users","node":"xEGrCaj-S8GtK6eko_wJVQ","reason":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.","caused_by":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}},"status":400}
from /usr/local/bundle/gems/elasticsearch-transport-7.2.1/lib/elasticsearch/transport/transport/base.rb:219:in `__raise_transport_error'
Integrated chewy gem of rails to implement elasticsearch in my app.
i tried to add max_result_window in chewy index but not able to execute that.