如果elasticsearch快照包含多个索引(例如: wikipedia、ehow、howStaffWorks ),那么我们是否可以将这些索引中的一个加载到elasticsearch服务器,或者在加载快照时必须加载所有索引?
发布于 2014-09-30 20:28:04
elasticsearch站点上的文档显示了从快照恢复特定索引:
curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore" -d '{
"indices": "index_1,index_2",
"ignore_unavailable": "true",
"include_global_state": false,
"rename_pattern": "index_(.+)",
"rename_replacement": "restored_index_$1"
}'请参阅上面的indices。
发布于 2016-02-19 05:22:24
可以,停那儿吧。不需要加载所有索引。
curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore" -d '{
"indices": "index_1",
"ignore_unavailable": "true",
"include_global_state": false,
"rename_pattern": "index_(.+)",
"rename_replacement": "restored_index_$1"
}'要加载所有索引,您可以使用以下代码(sense plugin)
PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true发布于 2016-09-09 07:09:04
是的我们可以装货。
$ curl -XPUT 'http://localhost:9200/twitter/' -d '
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2 https://stackoverflow.com/questions/26128801
复制相似问题