索引 API
原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/current/indices.html(修改该链接为官网对应的链接)
译文链接 : 索引 API(修改该链接为 ApacheCN 对应的译文链接)
贡献者 : @Sehriff
映射管理
类型存在
用于判断 type/types 是否存在于 index/indices,
HEAD twitter/_mapping/tweet
通过 HTTP状态码 判断 type 是否存在.如果是404则表示不存在,200表示存在.
别名管理
索引别名
elasticsearch 的 API 用于一个或多个 index 时以 index 名称为入参. index 别名 API 可以给 index 指定名称,同时所有的 API 都会自动把别名转化成真实的 index 名称.一个别名可以被映射成多个 index ,在指定别名的时候,别名会自动扩展成别名索引( aliases indices ).在搜索或路由值( value )时,别名还可以跟过滤器( filter )关联.别名的名称不能跟 index 相同.
以下是关联别名 alias1和索引 index的例子:
POST /_aliases
{
"actions" : [
{ "add" : { "index" : "test1", "alias" : "alias1" } }
]
}
还有删除别名的例子:
POST /_aliases
{
"actions" : [
{ "remove" : { "index" : "test1", "alias" : "alias1" } }
]
}
索引配置
丢雷楼某 、、、
目录 N - 标题 2
丢雷楼某 、、、