-
Notifications
You must be signed in to change notification settings - Fork 0
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
Search legislation TOC #1801
Search legislation TOC #1801
Conversation
this means we don't have to trash the whole index; we can just re-index legislation without breaking search
from django_elasticsearch_dsl.registries import registry | ||
|
||
if not settings.DEBUG: | ||
for ix in registry.get_indices(): |
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.
this allows us to add the new field to the mapping (which is allowed without having to destroy and re-create the mapping).
we only do it when DEBUG = False because we don't have an ES to talk to when testing.
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.
neat
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.
really cool. It really improves legislation search
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Closes #1759
https://www.loom.com/share/04d48383ebbe44299f2548f4967f282d
Note
This requires re-creating index mappings and re-indexing all content :(This automatically adds the new field to the mapping as a migration. We can then re-index legislation content only, at our leisure, without breaking search at all.