Reindex / Consolidate Indizes

How to migrate from multiple timebased indizes

<name>-<yyyymmdd> to a single <name> index without losing data?

What about using an index alias instead? So you don't need to reindex anything...

There is an oversharding problem. Initial we design daily indizes. Now we want to switch to weekly indizes. So alias wont help :frowning:

If you are forced to re-inject, I recommend you to use elasticsearch-dump.

I see. Out of curiosity,

What is the output of:

GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

If some outputs are too big, please share them on and link them here.

One short solution could be use the shrink API.

But yes, you can use the reindex API if you need.

  • Create a new weekly index (with the right settings/mappings)
  • Change the application which generates the data to write to this index
  • Use the reindex API to reindex your daily indices to the weekly index
  • Drop the daily indices

For the future I'd recommend using Index lifecycle Management (ILM).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.