-
Notifications
You must be signed in to change notification settings - Fork 46
Indexing models during cron job #620
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
Conversation
… deletion of project, contribution, and contributor items
ZibanPirate
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your suggested way is:
1- collect all documents to index in an array
2- bulk-delete all currently indexed documents from search db
3- bulk-index new documents from scratch into search db
meanwhile, this cron works slightly differently, where:
1- doesn't collect models, but instead upsert them on the spot to db
2- doesn't delete all models, but only outdated ones (runId is different)
3- doesn't have a third step
So, ... for the search implementation to follow along with this cron implementation it should:
1- index (upsert) each document on the spot, don't save it to an array and do that later.
2- bulk-delete all documents that are outdated (runId is different)
I added comments on how to do that
…d remove bulk deletion
… deletion of search items with runId
…unused search item arrays
…dd update filterable attributes
…y SearchItem type chore: introduce setupIndexes search method that ensure indexes and add update filterable attributes
7c7100b to
229e341
Compare
…ne search service initialization
…sistency and clarity
…r improved index management
… tables for consistency
ZibanPirate
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you a lot @omdxp ! one step forward to having search in the website
deleteAllDocumentssearch service method.