elasticsearch,Java,Configuration,elasticsearch" /> elasticsearch,Java,Configuration,elasticsearch" />

Java 弹性搜索配置中的节点名称不起作用

Java 弹性搜索配置中的节点名称不起作用,java,configuration,elasticsearch,Java,Configuration,elasticsearch,我试图在elasticsearch的配置中设置node.name,但没有看到任何使用我所需名称创建的节点。以下是我的elasticsearch.yml文件: cluster.name: mycluster node.name: "mynode" # Path to directory where to store index data allocated for this node. path.data: /path/to/data 您能告诉我哪里出了问题吗?非常感谢。它应该是什么样子的-注意

我试图在elasticsearch的配置中设置node.name,但没有看到任何使用我所需名称创建的节点。以下是我的elasticsearch.yml文件:

cluster.name: mycluster
node.name: "mynode"
# Path to directory where to store index data allocated for this node.
path.data: /path/to/data

您能告诉我哪里出了问题吗?非常感谢。

它应该是什么样子的-注意每个未注释设置的空格缩进

################################### Cluster ###################################

# Cluster name identifies your cluster for auto-discovery. If you're running
# multiple clusters on the same network, make sure you're using unique names.
#
 cluster.name: Test

################################### Cache ####################################
 indices.cache.filter.expire: 5m


#################################### Node #####################################

# Node names are generated dynamically on startup, so you're relieved
# from configuring them manually. You can tie this node to a specific name:
#
 node.name: "Test"

“我看不到使用所需名称创建的任何节点”是什么意思?您在找什么?确保缩进正确,检查日志文件中是否存在与您的问题相关的任何错误。感谢您的回复,但它不起作用。我可以看到ES create cluster和数据文件夹路径跟随我的配置,但只有节点名称不正确,我在集群中看不到ES create node和我的名称。