python脚本重建索引
2016-10-27 00:00
381 查看
转载自:http://blog.csdn.net/zy911016/article/details/52191261
平滑重建索引需使用别名,请参考:http://blog.csdn.net/dm_vincent/article/details/41643793
python
平滑重建索引需使用别名,请参考:http://blog.csdn.net/dm_vincent/article/details/41643793
python
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) #重建索引
相关文章推荐
- oracle 索引重建提示脚本
- 常用脚本--在线重建或重整实例下所有索引
- SQL重建索引的脚本
- SQL Server 索引重建脚本
- IDA Pro 脚本系统(idc idaPython)帮助文档索引
- Oracle 重建索引脚本
- 分区索引按分区重建脚本
- Oracle重建索引Shell脚本、SQL脚本分享
- oracle 重建索引以及导出所有的索引脚本(可以解决还原数据库文件时先还原数据,在重新用脚本创建索引)
- SQL Server索引重建和重新组织脚本
- Oracle重建索引Shell脚本、SQL脚本分享
- Oracle 重建索引脚本
- elasticsearch 重建索引 使用python迁移索引数据 reindex
- Scripts:重建索引的脚本(看懂脚本再用)rebuild_indx.sql
- Python程序实现批量创建/重建空间索引
- [python]生成cscope符号索引文件的脚本
- Scipts:生成重建索引的SQL脚本dba_rebuild_indexes.sql
- ES索引重建--使用python elasticsearch
- 看去索引重建进度的脚本
- 重建索引