##################### ElasticSearch 配置示例 #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
# 这个文件包含了各种配置的概览,旨在配置与运行操作相关的东西。
# 应用程序开发人员应该咨询<http://elasticsearch.org/guide>
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/reference/setup/installation.html>.
# 安装过程在这里有<http://elasticsearch.org/guide/reference/setup/installation.html>.
#
#
# ElasticSearch comes with reasonable defaults for most settings,
# so you can try it out without bothering with configuration.
# ElasticSearch 已经提供了大部分设置,都是合理的默认配置。
# 所以你不必进行烦人的配置就可以尝试一下。
#
# Most of the time, these defaults are just fine for running a production
# cluster. If you're fine-tuning your cluster, or wondering about the
# effect of certain configuration option, please _do ask_ on the
# mailing list or IRC channel [http://elasticsearch.org/community].
# 大多数时候,这些默认的配置就足以运行一个生产集群了。
# 如果你想优化你的集群,或者对一个特定的配置选项的作用好奇,你可以访问邮件列表
# 或者IRC频道[http://elasticsearch.org/community].
#
# Any element in the configuration can be replaced with environment variables
# by placing them in ${...} notation. For example:
# 配置中的任何一个元素都可以被环境变量取代,这些环境变量使用${...}符号占位
# 例如:
# node.rack: ${RACK_ENV_VAR}
# See <http://elasticsearch.org/guide/reference/setup/configuration.html>
# for information on supported formats and syntax for the configuration file.
# 查看<http://elasticsearch.org/guide/reference/setup/configuration.html>了解更多
# 的可支持的格式和配置文件的语法。
################################### 集群 ###################################
# 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: elasticsearch
#################################### 节点 #####################################
# 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: "Franz Kafka"
# Every node can be configured to allow or deny being eligible as the master,
# and to allow or deny to store the data.
# 每一个节点是否允许被选举成为主节点,是否允许存储数据,都是可以配置的
#
#
# Allow this node to be eligible as a master node (enabled by default):
# 允许这个节点被选举为一个主节点(默认为允许)
#
#
# node.master: true
#
# Allow this node to store data (enabled by default):
# 允许这个节点存储数据(默认为允许)
#
# node.data: true
# You can exploit these settings to design advanced cluster topologies.
# 你可以利用这些设置设计高级的集群拓扑
#
# 1. You want this node to never become a master node, only to hold data.
# This will be the "workhorse" of your cluster.
# 1. 你不想让这个节点成为一个主节点,只想用来存储数据。
# 这个节点会成为你的集群的“负载器”
#
# node.master: false
# node.data: true
#
# 2. You want this node to only serve as a master: to not store any data and
# to have free resources. This will be the "coordinator" of your cluster.
# 2. 你想让这个节点成为一个主节点,并且不用来存储任何数据,并且拥有空闲资源。
# 这个节点会成为你集群中的“协调器”
#
# node.master: true
# node.data: false
#
# 3. You want this node to be neither master nor data node, but
# to act as a "search load balancer" (fetching data from nodes,
# aggregating results, etc.)
# 4. 你既不想让这个节点变成主节点也不想让其变成数据节点,只想让其成为一个“搜索负载均衡器”
# (从节点中获取数据,聚合结果,等等)
#
# node.master: false
# node.data: false
# Use the Cluster Health API [http://localhost:9200/_cluster/health], the
# Node Info API [http://localhost:9200/_cluster/nodes] or GUI tools
# such as <http://github.com/lukas-vlcek/bigdesk> and
# <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
# 使用集群体检API[http://localhost:9200/_cluster/health] ,
# 节点信息API[http://localhost:9200/_cluster/nodes] 或者GUI工具例如:
# <http://github.com/lukas-vlcek/bigdesk>和<http://mobz.github.com/elasticsearch-head>
# 可以查看集群状态
#
# A node can have generic attributes associated with it, which can later be used
# for customized shard allocation filtering, or allocation awareness. An attribute
# is a simple key value pair, similar to node.key: value, here is an example:
# 一个节点可以附带一些普通的属性,这些属性可以在后面的自定义分片分配过滤或者allocation awareness中使用。
# 一个属性就是一个简单的键值对,类似于node.key: value, 这里有一个例子:
#
# node.rack: rack314
# By default, multiple nodes are allowed to start from the same installation location
# to disable it, set the following:
# 默认的,多个节点允许从同一个安装位置启动。若想禁止这个特性,按照下面所示配置:
# node.max_local_storage_nodes: 1
#
#################################### 索引 ####################################
# You can set a number of options (such as shard/replica options, mapping
# or analyzer definitions, translog settings, ...) for indices globally,
# in this file.
# 你可以在这个文件中为所有的索引设置一系列的全局操作(例如 分片/副本 操作,mapping(映射)
# 或者分词器定义,translog配置,...)
#
#
# Note, that it makes more sense to configure index settings specifically for
# a certain index, either when creating it or by using the index templates API.
# 提示,针对一个特定的索引进行配置更合理,不论是在创建索引还是使用索引模板API的时候。
#
#
# See <http://elasticsearch.org/guide/reference/index-modules/> and
# <http://elasticsearch.org/guide/reference/api/admin-indices-create-index.html>
# for more information.
# 详情见<http://elasticsearch.org/guide/reference/index-modules/>和
# <http://elasticsearch.org/guide/reference/api/admin-indices-create-index.html>
# Set the number of shards (splits) of an index (5 by default):
# 设置一个索引的分片数量(默认为5)
#
# index.number_of_shards: 5
# Set the number of replicas (additional copies) of an index (1 by default):
# 设置一个索引的副本数量(默认为1)
#
# index.number_of_replicas: 1
# Note, that for development on a local machine, with small indices, it usually
# makes sense to "disable" the distributed features:
# 注意,为了使用小的索引在本地机器上开发,禁用分布式特性是合理的做法。
#
#
# index.number_of_shards: 1
# index.number_of_replicas: 0
# These settings directly affect the performance of index and search operations
# in your cluster. Assuming you have enough machines to hold shards and
# replicas, the rule of thumb is:
# 这些设置会直接影响索引和查询操作的在集群中的性能。假如你有足够的机器来放分片和副本,
# 最佳实践是:
#
# 1. Having more *shards* enhances the _indexing_ performance and allows to
# _distribute_ a big index across machines.
# 1. 索引分片分的多一些,可以提高索引的性能,并且把一个大的索引分布到机器中去。
# 2. Having more *replicas* enhances the _search_ performance and improves the
# cluster _availability_.
# 2. 副本分片分的多一些,可以提高搜索的性能,并且提高集群的可用性。
#
# The "number_of_shards" is a one-time setting for an index.
# "number_of_shards"对一个索引来说只能配置一次
#
# The "number_of_replicas" can be increased or decreased anytime,
# by using the Index Update Settings API.
# "number_of_replicas"在任何时候都可以增加或减少,通过Index Update Settings(索引更新配置)API可以做到这一点。
#
#
# ElasticSearch takes care about load balancing, relocating, gathering the
# results from nodes, etc. Experiment with different settings to fine-tune
# your setup.
# ElasticSearch 会维护load balancin(负载均衡),relocating(重定位),合并来自各个节点的结果等等。
# 你可以实验不同的配置来进行优化。
#
# Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
# the index status.
# 使用Index Status(索引状态)API (<http://localhost:9200/A/_status>)查看索引状态
#################################### Paths(路径) ####################################
# Path to directory containing configuration (this file and logging.yml):
# 包含配置(这个文件和logging.yml)的目录的路径
#
# path.conf: /path/to/conf
# Path to directory where to store index data allocated for this node.
# 存储这个节点的索引数据的目录的路径
#
# path.data: /path/to/data
#
# Can optionally include more than one location, causing data to be striped across
# the locations (a la RAID 0) on a file level, favouring locations with most free
# space on creation. For example:
# 可以随意的包含不止一个位置,这样数据会在文件层跨越多个位置(a la RAID 0),创建时会
# 优先选择大的剩余空间的位置
#
# path.data: /path/to/data1,/path/to/data2
# Path to temporary files:
# 临时文件的路径
#
# path.work: /path/to/work
# Path to log files:
# 日志文件的路径
#
# path.logs: /path/to/logs
# Path to where plugins are installed:
# ��件安装路径
#
# path.plugins: /path/to/plugins
#################################### 插件 ###################################
# If a plugin listed here is not installed for current node, the node will not start.
# 如果当前结点没有安装下面列出的插件,结点不会启动
#
# plugin.mandatory: mapper-attachments,lang-groovy
################################### 内存 ####################################
# ElasticSearch performs poorly when JVM starts swapping: you should ensure that
# it _never_ swaps.
# 当JVM开始swapping(换页)时ElasticSearch性能会低下,你应该保证它不会换页
#
#
# Set this property to true to lock the memory:
# 设置这个属性为true来锁定内存
#
# bootstrap.mlockall: true
关注公众号,解锁完整文章
微信扫码关注 星哥玩云,
在公众号对话框回复关键词 星哥玩云博客 获取验证码。输入后即可阅读全文,
一次解锁全站文章通用。