DELETE elasticsearch index while running the reindex task on the same index

I would like to know what will happen If I am trying to delete the elasticsearch index when the reindex task in progress..

Is it through the error?
it will suspend the reindex task and delete the index?
Is delete index will wait for the completion of the reindex task then immediately the index will delete?

curl -X DELETE localhost:9200/source_index?pretty

curl -X POST localhost:9200/_reindex -d '{ "source" : { "index" : "source_index" }, "dest" : { "index" : "dest_index" }}'


Why would you want to do such a thing?

BTW please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:


This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

I have an es index which is taking more than 10 hrs for reindexing. In the situation like when the reindex is in progress at that time I have a schedule time for the db refresh which is involved delete index. So, I just want to know If I do commit to do refresh when the reindex is in progress what will happen.

I never tried such a thing but it should not be hard to simulate and see what is happening.
I'm not sure if the DELETE index operation is waiting for any scroll operation or not.

But I'm wondering what is the global picture of your design. Why are you reindexing every day? Why are you dropping the index everyday? Could you explain a bit more about your use case?

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