Astart
Astart

Reputation: 11

Does Re-index in Elasticsearch has zero-down time?

Currently, I'm working with Elasticsearch, I'm interested in reindexing because it has no time down. I have a question if my index has very much data (1 million documents for example), when I call POST _reindex, all documents in old index are transferred immediately to new index? Or I have to wait until all documents is completed to query in new index?

Upvotes: 0

Views: 1454

Answers (1)

imotov
imotov

Reputation: 30163

Reindex will take time since as the name suggests it re-indexes all the document from one index to another. No downtime means that your source index will be still available during the process. Two things to keep in mind during reindexing though:

  1. Reindexing will be reading documents and indexing them, so it will have impact for both disk, I/O and CPU utilization. Make sure that your cluster has capacity to accommodate such load.
  2. It takes time to reindex. So, if your source index will receive any updates during this process, these updates might not be reflected in the target index. So, the simplest solution would be to pause updating the source index and the restart updates already with the new index.

Upvotes: 1

Related Questions