elasticsearch.yml 配置說明

集羣名稱,默認爲elasticsearch, 命名規則爲 es-產品名-ES版本

cluster.name: es-fengkong-2.1.1node

節點名稱,es啓動時會自動建立節點名稱,但你也可進行配置

node.name: es-46-68-76elasticsearch

設置索引的分片數

index.number_of_shards: 5tcp

設置索引的副本數

index.number_of_replicas: 1插件

是否爲主節點,一個集羣中建議只配置一個主節點

node.master: false線程

數據存儲位置

path.data: /data1/elasticsearch/datacode

這個參數是用來同時設置bind_host和publish_host上面兩個參數 v2.0以上默認是127.0.0.1

network.host: 0.0.0.0索引

設置對外服務的http端口,默認爲9200

http.port: 9200token

設置節點間交互的tcp端口,默認是9300

transport.tcp.port: 9300產品

ES 的分詞插件

index.analysis.analyzer.default.type : "hanlp"
index.analysis.tokenizer.default.type : "hanlp"
index.version.created : 2010199
index.max_result_window: 1500000io

這是一個集羣中的主節點的初始列表,當節點(主節點或者數據節點)啓動時使用這個列表進行探測

discovery.zen.ping.unicast.hosts: ["10.47.51.190:9300", "10.46.68.76:9300"]

因爲阿里禁止廣播,建議關閉廣播

discovery.zen.ping.multicast.enabled: false

ping 的超時時間

discovery.zen.ping_timeout: 10s

ping 的超時時間 Fault Detection

discovery.zen.fd.ping_timeout: 10s

ping 重試的次數

discovery.zen.fd.ping_retries: 6

ping 的間隔

discovery.zen.fd.ping_interval: 5s

cache 的最大佔比

indices.fielddata.cache.size : 50%

線程池的配置

threadpool:
search:

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

threadpool:
index:

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

threadpool:
bulk:

type: fixed
  size: 2
  queue_size: 50
相關文章
相關標籤/搜索