-
Notifications
You must be signed in to change notification settings - Fork 1
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
task/FP-982: Add rebuild_index
haystack signal processor
#189
Conversation
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.
Elegant.
Testing
- ✓ Confirm index did not auto-update on
main
. - ✓ Confirm publish of edited page updates index.
- "Text" plugin addition
- "Text" plugin change
- ✓ Confirm page removal updates index.
- ✓ Confirm page addition (after publish) updates index.
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.
I don't want to nitpick, but at least let Bob McNewguy know this is search-related. A haystack signal process who what, now? I get it, but I sure didn't used to.
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 for mentioning search!
Overview
On a document publish, unpublish, or delete event, we want the cms index to rebuild. This adds a new signal processor that hooks into Haystack, and subclasses the BaseSignalProcessor class.
Notes:
An improvement would be to add/remove the document from the index instead of rebuilding, but I had trouble updating the index with the instance object returned from the
post_publish
signal. Since we have relatively few documents and activity on each cms, the occasional rebuild_index call will not be a resource burden.Testing:
localhost:9201/cms-dev-cms/_search
and verify the document is not in the indexlocalhost:9201/cms-dev-cms/_search
, and verify the document is now therelocalhost:9201/cms-dev-cms/_search
, and verify the document is gone