Skip to content
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

Support double indexes #1642

Open
OuYangJinTing opened this issue Jul 27, 2023 · 1 comment
Open

Support double indexes #1642

OuYangJinTing opened this issue Jul 27, 2023 · 1 comment

Comments

@OuYangJinTing
Copy link

First of all, thank you very much for your contribution. This gem is fantastic 🎉.

Currently, with Searchkick, you can only select one index for a model. After calling model_class.reindex, the new index is written, and Searchkick will automatically switch from the old index to the new one. This is very smart, but it comes with a prerequisite: the new index must be consistent with expectations, which cannot be guaranteed 100%. If there is a significant difference from the expected result, it may be necessary to rollback and switch back to the old index.

It would be great if Searchkick could support multiple indexes. In that case, it would be possible to divert some of the traffic to the new index first. After ensuring that the new index achieves the expected results, all the traffic can be switched to the new index~

PS: English is not my native language; please excuse typing errors.

@emptyflask
Copy link

Building onto this idea, I'd like to be able to have multiple indices for a model, so that records for a given time range (let's say, a year) will all be together in their own index. It would make indexing and queries more efficient, and old data can be easily dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants