0
我創建了一個包含3個主碎片的索引,但ElasticSearch返回並指示有4個主碎片。ElasticSearch返回4個主碎片而不是3個
# Deleting the data in the cluster
DELETE /_all
# Create an index with 3 primary shards with 1 replica each
PUT /blogs
{
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 1
}
}
# Retrieve the cluster health
GET /_cluster/health
這裏是迴應:
{
"cluster_name": "clus",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 4,
"active_shards": 4,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 4
}
我認爲,世界上只有副本碎片可能會改變和初級碎片的數量是固定的時候,該指數的數創建,哪裏來自第四個主要碎片?
就是這樣,謝謝 – Ydhem 2014-08-28 18:45:23