-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use index-swap when reindexing #267
Comments
This issue is related to this one: meilisearch/integration-guides#223 |
This presents a couple of difficulties to implement on The primary issue is about shared indexes. Since currently we only keep track (and can only keep track) of the indexes on models, For the sake of argument imagine a Attempting to keep track of them with some sort of configuration hash is no good. Models in Rails are lazy-loaded, which means the Attempting to cache this on some sort of persistent configuration would likely be vulnerable to edge case bugs with newly added models or updated meilisearch configurations that have not been cached yet. The current From the algoliasearch-rails README on shared indexes:
Essentially, they defer judgement about whether or not to do an index swap or a regular reindex to the user. I am personally not sure if I like that idea, it seems to me like it could cause trouble for users who aren't well versed in the terminology or have so many models that it is not feasible to expect them to be accurate in determining if an index is shared or not. |
Curious if there has been any movement on this? I would really like to reindex without worry (#263 (comment)) |
Bump on this 👁️ |
I'm not sure what you want from this issue exactly. I outlined the problem with using index-swap, are you saying that you would want it implemented regardless? |
Considering the issue hasn't been closed, I assumed it was still up for discussion @ellnix. I do believe not deleting documents as part of re-index is a bug, as it's not a behaviour a user would expect #263 (comment). So whether it's a shared index or something else, I feel like it should be addressed. Otherwise, everyone would have to implement their own "reindex!", that first goes through all the documents to find those that got deleted, delete them and then do another pass re-indexing the existing documents. I feel like the rails integration should be able to handle it for us |
Following these issues: #234 and #263
We could improve this method behavior by adding the fix for issue #234 and also make the creation of a new temporary index then adding the data, and then switching it to the current index name using index swap.
So we can run it in production without downtime.
The text was updated successfully, but these errors were encountered: