Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reindex ElasticSearch quickly?

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?

like image 714
diemacht Avatar asked Jun 09 '13 08:06

diemacht


1 Answers

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

like image 122
diemacht Avatar answered Oct 02 '22 16:10

diemacht