Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between cloning and reindexing an index in Elasticsearch?

For example:

  1. Clone API
  2. Reindex API

When is each API best for what?

like image 270
Amelio Vazquez-Reina Avatar asked Dec 05 '19 15:12

Amelio Vazquez-Reina


People also ask

What does Reindexing mean in Elasticsearch?

Reindex is the concept of copying existing data from a source index to a destination index which can be inside the same or a different cluster. Elasticsearch has a dedicated endpoint _reindex for this purpose. A reindexing is mostly required for updating mapping or settings.

Why do we need to reindex?

REINDEX provides a way to reduce the space consumption of the index by writing a new version of the index without the dead pages. See Section 23.2 for more information. You have altered a storage parameter (such as fillfactor) for an index, and wish to ensure that the change has taken full effect.


1 Answers

You have the answer inside: "Reindex does not copy the settings from the source index. Mappings, shard counts, replicas, and so on must be configured ahead of time."

like image 110
work service Avatar answered Sep 23 '22 13:09

work service