如何快速重新索引ElasticSearch? [英] How to reindex ElasticSearch quickly?

查看:179
本文介绍了如何快速重新索引ElasticSearch?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ElasticSearch索引,大约有200M文档,总索引大小为90Gb。



我更改了映射,所以我希望ElasticSearch重新索引所有的文档



我写了一个脚本,创建一个新的索引(使用新的映射),然后遍历旧索引中的所有文档,然后放入新的索引。



似乎有效,但问题是它的工作非常慢。
两天前以300个文件/分钟开始,现在速度为150个文档/分钟。



该脚本在同一网络内的计算机上运行弹性搜索机器。



以这样的速度,重新索引需要一个月才能完成。



<有没有人知道一些更快的技术来重新设计弹性搜索索引?

解决方案

在Google群组中回答: / p>

选项A:
使用批量索引操作。



选项B:
使用ES机器中运行的重新索引插件: https://github.com/karussell/elasticsearch-reindex


I have an ElasticSearch index with around 200M documents, total index size of 90Gb.

I changed mapping, so I would like ElasticSearch to re-index all the documents.

I wrote a script that creates a new index (with the new mapping), then goes over all the documents in the old index and puts then into the new one.

It seems to work, but the problem is that it works extremely slowly. It started with 300 documents / minute two days ago, and now the speed is 150 documents/minute.

The script runs on a machine within the same network the elastic search machines in.

With such speed it will require a month for the re-index to finish.

Does anybody know about some faster technique to re-index an elastic search index?

解决方案

Answered in the google groups:

Option A: Use bulk index operations.

Option B: Use the re-index plug-in that runs inside ES machine: https://github.com/karussell/elasticsearch-reindex

这篇关于如何快速重新索引ElasticSearch?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆