Reindex big index


(Jackiekhuu Work) #1

I would like to reindex a very big index.

When I run reindex API with elasticsearchjs client I will receive the requestTimeout error, or Gateway timeout error.
It's ok because the reindex process is still running in Elastic server. However, what I want to do is after the reindex finish with full data, I will execute another task.
The question is how can I know the reindex succeeded to run other task?
What is the best practice for this use case?
Please help!


#2

You can use POST http://xxx.xxx.xxx.xxx:9200/_reindex?wait_for_completion=true in the url so that the query for reindex wait to return the response until completion.

Or you can check
GET http://xxx.xxx.xxx.xxx:9200/_tasks/?pretty&detailed=true&actions=*reindex
in an interval and see if the response is not nodes:{} empty.


(system) #3

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