Elasticsearch

aliyun阿里云Maven仓库地址——加速你的maven构建 在maven的settings.xml 文件里配置mirrors的子节点,添加如下mirror /usr/local/Cellar/maven/3.3.9/libexec/conf/settings.xml

<mirror>
  <id>nexus-aliyun</id>
  <mirrorOf>*</mirrorOf>
  <name>Nexus aliyun</name>
  <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

unzip target/releases/elasticsearch-analysis-ik-5.2.0.zip -d /usr/share/elasticsearch/plugins/ik

重建索引

from elasticsearch import Elasticsearch
from elasticsearch import helpers

es_src=Elasticsearch(host_src)   #原索引所在ES集群的host
es_des=Elasticsearch(host_des)   #新索引所在ES集群的host

body={"query":{"match_all":{}}}  #遍历原索引

helpers.reindex(client=es_src,source_index='wechat',target_index='wechat_new',target_client=es_des,query=body,chunk_size=1000) #重建索引

索引别名和零停机时间(Index Alias and Zero Downtime)

http://blog.csdn.net/dm_vincent/article/details/41643793

Yan Peipan 06 February 2017