首页 > 解决方案 > Elasticsearch 仅主节点工作

问题描述

我正在尝试Index A从 python(aggs 查询)代码到 ES 服务器执行一些查询。

我的配置:

Index A分片node-superman-1->node-superman-4

node-superman-1->node-superman-4数据节点。

node.master: true 
node.data: true 
node.ingest: true 

node-superman-client-41只是一个节点,我试图调用这个节点。

node.master: false
node.data: false
node.ingest: false

但只能node-superman-3工作(我试图运行多线程,必须等待以后的线程)。

Python代码:

我曾经elasticsearch连接到node-superman-client-41

使用搜索功能elasticsearch.search

data = elasticsearch.search(index='Index_A', body=query, 
request_timeout=120)

query就像普通查询一样{ query: { ... }, aggs: { ... } }

我创建了多连接并在多线程中使用:

在此处输入图像描述

所以为什么?如何共享另一个节点(1、2、4)?

在此处输入图像描述

谢谢!

标签: elasticsearch

解决方案


推荐阅读