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

Re-index all models #66

Open
isamaru opened this issue Aug 29, 2012 · 2 comments
Open

Re-index all models #66

isamaru opened this issue Aug 29, 2012 · 2 comments

Comments

@isamaru
Copy link
Contributor

isamaru commented Aug 29, 2012

We want to be able to manually rebuild the indices in case we lose elasticsearch or it gets out of sync with our production database.
I am preparing a solution for this and I will issue a pull request once this is implemented.
Basically, it will be a method which scans all available models, selects all records from the database, and indexes all of them as if they just have been created.

@kretes
Copy link

kretes commented Aug 29, 2012

Bigger problem is when object is indexed in elasticsearch, but not in the database. Shouldn't there be another loop through all objects in the index and for each a check if it's in the DB, and if not - remove it from the index?

@isamaru
Copy link
Contributor Author

isamaru commented Aug 29, 2012

I'd rather delete all indices and then recreate them, because you need one indexing operation per model anyway. But it could be worth doing your way if you are live and don't want any downtime during reindexing (which could take a while).

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

No branches or pull requests

2 participants