I have created a python script able to reindex based on list of index.
My problem is the timeout and wait_for_completion option.
When my script launch a reindexation I have to wait until is finished otherwise the reindexation is not performed entirely. For this purpose I need to implement the right global option request_timeout based on index sized and wait the end of the reindexation for each index.
If I put wait_for_completation, I raise an exception and my reindexation failed (I have an index with some kilobyte inside). If I use the timeout option in reindex module (with 5 minutes for example), it fail too (I also get a new index without all my documents inside).
So the only way for me is to use the global request_timeout parameter with value generated depending on index size. But if my index is big, it can take a while.
In my environment, 10 indices took 30 minutes. But for the next time in need to reindex almost 200 indices so it is too long.
If somebody have an idea to play this kind of script in background or something like that.
Thanks in advance,