elasticsearch常用命令
生活随笔
收集整理的這篇文章主要介紹了
elasticsearch常用命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.手動分派分片
curl -XPOST 'http://ip:httpport/_cluster/reroute' -d '{"commands": [{"allocate": {"index": "indexName","shard": shardNumber,"node": "target_node_name","allow_primary": "false"}}] }'?
2.手動移動分片?
curl -XPOST "http://168.7.1.67:9200/_cluster/reroute' -d '{ "commands" : [{ "move" : { "index" : "log4j-emobilelog", "shard" : 0, "from_node" : "es-0", "to_node" : "es-3" } }] }'?
3.動態設置es索引副本數量??
curl -XPUT 'http://ip:httpport/indexName/_settings' -d '{"number_of_replicas" : 1 }'?
4.mapping中添加字段
curl -XPUT /index/type/_mapping{"properties": {"ivr_phone": {"type": "text"},"resource_shop_id": {"type": "long"}} }?
轉載于:https://www.cnblogs.com/wzj4858/p/8145394.html
總結
以上是生活随笔為你收集整理的elasticsearch常用命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux 问题一 apt-get in
- 下一篇: 4.RabbitMQ Linux安装