Elasticsearch7.3 配置

更多配置请参考:

elasticsearch.yml:

elasticsearch-7.3.2/config/elasticsearch.yml

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster 集群名称 -----------------------------------
# 集群就是由一个或多个节点组织在一起, 它们共同持有你全部的数据, 并一起提供索引和搜索功能
#
# 为集群使用描述性名称:
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node 节点名称 ------------------------------------
# 一个节点是你集群中的一个服务器,作为集群的一部分,它存储你的数据,参与集群的索引和搜索功能
#
# 对节点使用描述性名称:
# Use a descriptive name for the node:
#
#node.name: node-1
#
# 将自定义属性添加到节点:
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths 路径设置 ------------------------------------
#
# 数据存储目录的路径(用逗号分隔多个位置):
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# 日志文件的路径:
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory 内存 -----------------------------------
#
# 启动时锁定内存:
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# 确保将堆大小设置为大约可用内存的一半在系统上,并且允许进程的所有者使用此限制。
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# 系统交换内存时,Elasticsearch 的性能较差。
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network 网络 -----------------------------------
#
# 将绑定地址设置为特定的IP(IPv4或IPv6):
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# 为HTTP设置自定义端口:
# Set a custom port for HTTP:
#
#http.port: 9200
#
# 有关更多信息,请查阅网络模块文档。
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# 在启动此节点时,传递主机的初始列表以执行发现:
# Pass an initial list of hosts to perform discovery when this node is started:
# 主机的默认列表为[“ 127.0.0.1”,“ [:: 1]”]
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# 使用初始的符合主机资格的节点集引导集群:
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# 有关更多信息,请查阅发现和集群形成模块文档。
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway 网关 -----------------------------------
#
# 在整个集群重新启动之后阻止初始恢复,直到启动 N 个节点为止:
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# 有关更多信息,请查阅网关模块文档。
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various 声明 -----------------------------------
#
# 删除索引时需要明确的名称:
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

# 集群名称
cluster.name: elasticsearch

# 集群节点名称
node.name: master
# node.master: true

# 绑定本地 ip 与端口
network.host: 127.0.0.1
http.port: 9200

# 支持跨域
http.cors.enabled: true
http.cors.allow-origin: "*"
讨论数量: 0

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!