I've set up parallel re-indexing of an index.
Product.reindex(async: {wait: true})
I am running that code in a DelayedJob and waiting since it seems the alternative would be to periodically check on completion status and then promote the new index -- this seems simpler.
Confusingly, reindex never seems to complete. Despite the fact that I've tested it on an index with a single document, I continue to see log messages of "Batches left: 1".
I expect I am misunderstanding the documentation.
There was a race condition in the code that could cause this. It's fixed in Searchkick 3.0.3+. Here's the relevant commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With