elasticsearch.yml Configuration description


The cluster name is elasticsearch by default, and the naming rule is es product name es version

cluster.name: es-fengkong-2.1.1

Node name, which is automatically created when es starts, but you can also configure it

node.name: es-46-68-76

Sets the number of slices of the index

index.number_of_shards: 5

Sets the number of copies of the index

index.number_of_replicas: 1

It is recommended to configure only one master node in a cluster

node.master: false

Data storage location

path.data: /data1/elasticsearch/data

This parameter is used to set bind at the same time_ Host and publish_ The two parameters above v2.0 of host are by default


Set the HTTP port of external service. The default is 9200

http.port: 9200

Set the TCP port for interaction between nodes. The default value is 9300

transport.tcp.port: 9300

Es word segmentation plug-in

index.analysis.analyzer.default.type : “hanlp”
index.analysis.tokenizer.default.type : “hanlp”
index.version.created : 2010199
index.max_result_window: 1500000

This is an initial list of the master nodes in the cluster, which is used to probe when the node (Master or data node) is started

discovery.zen.ping.unicast.hosts: [“”, “”]

Since Ali forbids broadcasting, it is suggested to turn off broadcasting

discovery.zen.ping.multicast.enabled: false

Ping timeout

discovery.zen.ping_timeout: 10s

Ping timeout fault detection

discovery.zen.fd.ping_timeout: 10s

Number of Ping retries

discovery.zen.fd.ping_retries: 6

Ping interval

discovery.zen.fd.ping_interval: 5s

Maximum proportion of cache

indices.fielddata.cache.size : 50%

Configuration of thread pool


  type: fixed
  size: 7
  queue: 1000
  # reject_policy: caller


  type: fixed
  size: 3
  queue: 200
  # reject_policy: caller


  type: fixed
  size: 2
  queue_size: 50