elastic作文本索引,match_all目標索引超過10000條時,出錯api
{ "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 [500000]. 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." } ], ... 省略無關 ...
根據關鍵字Result window is too large及錯誤提示,得知須要設置目標索引[index.max_result_window]less
kibana直接修改(或以此格式代碼內修改)code
PUT /idx_XXXXXXXXXXXXX/_settings { "index": { "max_result_window":1000000 } }