es查询的时候,报错:
具体的错误信息:
{"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":
"Result window is too large, from + size must be less than or equal to: [10000] but was [111116].
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":"flow_form_index_1041801","node":"397-YTkgQ5edZVWHsymJmg","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [111116]. 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":500}
处理:
1,postman请求:
注意请求类型是PUT
2,kibana dev tools
PUT car_statics_index/_settings
{
"index": {
"max_result_window": 100000000
}
}
请求后,再验证下:
这样就可以了。
同理:
如果是错误:
ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception,
reason=Limit of total fields [1000] in index [data_index] has been exceeded]]
一个索引里面的fiedls的个数超过1000。
相似的处理:
PUT data_index/_settings
{
"index.mapping.total_fields.limit": 2000
}