Elasticsearch配置文件說明

404446295 8年前發布 | 20K 次閱讀 ElasticSearch 搜索引擎

來自: http://www.begincode.net/blog/blogId/83


官方配置文檔

      https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html

配置詳解

# ---------------------------------- Cluster (集群配置)-----------------------------------
#
# cluster.name: my-application   (自定義集群名稱,相同集群該名稱相同  my-application)
#
# ------------------------------------ Node ------------------------------------
#
 node.name: node-1     (當前節點名稱,同一個集群中不能重復)

#
# Add custom attributes to the node:
#
# node.rack: r1
#
# ----------------------------------- Paths (數據,日志路徑配合)------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
 path.data: /home/yang/elasticsearch-2.2.0/data  (數據存儲路徑,支持多路徑)
#
# Path to log files:
#
 path.logs: /home/yang/elasticsearch-2.2.0/logs  (日志文件存儲路徑)
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.mlockall: true   (是否鎖住內存,指長期占用該內存,不產生內存交換,防止內存交換導致性能降低,配合內存設置使用)
#
# Make sure that the `ES_HEAP_SIZE` environment variable 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 performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network(網絡配置) -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 192.168.0.1      (IP地址,url訪問的ip)
#
# Set a custom port for HTTP:
#
# http.port: 9200       (http訪問端口)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- Discovery (節點發現配置)----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]    (初始主節點列表,默認啟動是按照這個初始化master節點)
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
# discovery.zen.minimum_master_nodes: 3(集群中可以知道其他n個有master自個節點,默認 節點數/2 + 1)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway-------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3   (n個節點啟動后開始數據恢復)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1  (禁用多節點從同一個位置啟動)
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true  (設置是否可以通過正則或者_all刪除或者關閉索引)
 本文由用戶 404446295 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!