Elasticsearch 使用技巧筆記

1.從新分片curl

當出現Unassigned分片時,咱們能夠經過分片重分配解決這個問題elasticsearch

curl -X PUT http://192.168.0.37:9200/_cluster/settings \
  -d '{
  "transient": {
    "cluster.routing.allocation.enable": "all"
  }
}'

 

2.從新設定副本數量url

ES能夠隨時變動副本數量,例如在初期向ES中導入數據的時候,設定副本數爲0,導入結束後再提高副本數,可大大提高導入效率spa

curl -XPUT '192.168.0.37:9200/youIndexName/_settings' -d '{"number_of_replicas":1}'

 

3.資源佔用狀況code

ES內存那點事blog

相關文章
相關標籤/搜索