elasticsearch Elasticsearch索引最大结果窗口配置异常
当我在ubuntu虚拟机中将此配置添加到elasticsearch Elasticsearch索引最大结果窗口配置异常,elasticsearch,configuration,elasticsearch,Configuration,当我在ubuntu虚拟机中将此配置添加到/etc/elasticsearch/elasticsearch.yml时 index.max_result_window: 1000000 在这个配置之后,当我重新启动Elasticsearch时,给我这个异常 service elasticsearch status ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticse
/etc/elasticsearch/elasticsearch.yml
时
index.max_result_window: 1000000
在这个配置之后,当我重新启动Elasticsearch时,给我这个异常
service elasticsearch status
● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Pzt 2017-12-11 11:52:02 +03; 1s ago
Docs: http://www.elastic.co Process: 17997 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${L Process: 17994 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS) Main PID: 17997 (code=exited, status=1/FAILURE)
Ara 11 11:51:55 bilal-VirtualBox systemd[1]: Stopped Elasticsearch. Ara 11 11:51:55 bilal-VirtualBox systemd[1]: Starting Elasticsearch... Ara 11 11:51:55 bilal-VirtualBox systemd[1]: Started Elasticsearch. Ara 11 11:52:02 bilal-VirtualBox systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE Ara 11 11:52:02 bilal-VirtualBox systemd[1]: elasticsearch.service: Unit entered failed state. Ara 11 11:52:02 bilal-VirtualBox systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
这是
elasticsearch 5.x
中的预期行为。
不允许在节点级配置上设置索引级设置
从
默认为10000的index.max_result_窗口是一种保护措施,
搜索请求占用的堆内存和时间与from+大小成比例
如果你查看elasticsearch日志,它会显示如下内容:
在节点级配置上找到索引级设置
由于elasticsearch 5.x索引级别设置无法在
系统属性中的节点配置,如elasticsearch.yaml
或命令行参数。要升级所有索引
必须通过/${index}/\u设置API更新设置。除非所有
设置是动态的,必须关闭所有索引才能应用
将来创建的升级索引应使用索引模板
设置默认值
解决方案?
请确保通过执行以下操作更新所有索引上的所有必需值:
curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
"index.max_result_window" : "1000"
}'
或者
您可以使用谢谢。我在麋鹿论坛上问了这个问题。麋鹿开发者的回答:
使用滚动api解决此问题。