主要针对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。一个别名能够关联上一个过滤器,当搜索和路由的时候能够自动使用这个过滤器。