Elasticsearch Alias第一篇 Index Alias

本文档详细介绍了Elasticsearch中Index Alias的使用,包括添加、删除、重命名和切换别名,以及如何创建指向多个index的别名。通过别名,可以方便地在多个index间进行操作,实现数据的快速切换和管理。
摘要由CSDN通过智能技术生成

主要针对1.5版本,主要参考自官网资料,可以理解为一个翻译+实践+扩充的版本

Index Alias

当针对某个指定的index进行操作时候,ElasticSearch中的API接受一个index的名字。当然在多个index的情况下也可以指定多个index。多个index使用可以如下:

/_search
Search all types in all indices
/gb/_search
Search all types in the gb index
/gb,us/_search
Search all types in the gb and us indices
/g*,u*/_search
Search all types in any indices beginning with g or beginning with u
/gb/user/_search
Search type user in the gb index
/gb,us/user,tweet/_search
Search types user and tweet in the gb and us indices
/_all/user,tweet/_search
Search types user and tweet in all indices

index aliases的API允许我们为一个index指定别名。一个别名能够被映射到多个index中,当指定了index对应已经有其它index对应的别名之后,别名可以自动扩展到多个index。一个别名能够关联上一个过滤器,当搜索和路由的时候能够自动使用这个过滤器。

add别名

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值