我想创建索引并使用模板修改其设置,同时为其创建别名
"template_1" : {
"order" : 0,
"index_patterns" : [
"test*"
],
"settings" : {
"index" : {
"number_of_shards" : "2",
"number_of_replicas" : "2"
}
},
"mappings" : { },
"aliases" : {
"some-alias" : { }
}
}
}
当我尝试使用别名放置文档时,它会尝试使用别名创建索引。但是,我正在寻找某种东西来搜索具有该别名的索引,并抛出一个错误,指出该别名不存在索引]
我想创建一个索引并使用模板修改其设置,同时为其创建一个别名“ template_1”:{“ order”:0,“ index_patterns”:[“ test *”],“ ...
问题是,您使用单个别名引用多个索引,因此当您PUT
时,文档ES并不知道将其存储在哪个文档中。引用文档: