elasticsearch问题集合

前提条件:环境是win10

 

一、设置 network.host: 0.0.0.0 后,无法启动

日志的错误提示

日志查看位置: elasticsearch-7.10.1\logs\elasticsearch.log 

 the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured 

解决方案:

修改
 elasticsearch.yml 
取消注释保留一个节点
 cluster.initial_master_nodes: ["node-1"] 

 

二、ES默认最大返回值10000条记录的问题

对ES服务器进行设置

curl -H "Content-Type: application/json" -X PUT 'http://127.0.0.1:9200/your_index/_settings?preserve_existing=true' -d '{"max_result_window" : "100000"}'

 

 另一种是修改配置文件,网上有的

 

posted @ 2021-01-07 13:06  delafqm  阅读(80)  评论(0编辑  收藏  举报