我有一个包含3个节点的Elasticsearch
群集。每个节点都可以成为主节点和数据节点。我的Elasticsearch
设置为:
index.number_of_shards: 8
index.number_of_replicas: 2
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
gateway.expected_nodes: 3
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["host1", "host2:9200","host3:9200"]
My Cluster is up now and cluster health is green. But Shard allocation is like
Node1 - 0,1,2,3,4,6 where 6 is primary and other are replicas
Node2 - 5,6,7 all replicas
Node3 - 0,1,2,3,4,5,7 all primary
此结构仅显示节点上每个分片的1个副本副本。但是我在设置中提到了2个副本,然后它应该显示每个分片的2个副本。
我是否理解错误或设置中缺少某些内容。
答案 0 :(得分:1)
index.number_of_replicas
from elasticsearch.yml
is for new indices. The ones you already have need to be adjusted manually: PUT /_all/_settings { "index": { "number_of_replicas": 2 } }
Also, do please consider upgrading. ES is now at version 2.3.1, 0.90 is very old.