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

Improve searching of petitions #787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pixeltrix
Copy link
Contributor

By using the btree_gin extension and merging the indexes on the various columns into a single index combined with state, debate_state and parliament_id for archived petitions we can achieve a significant performance gain of more than 10x when searching arbitrary text.

This also adds in the petition id to the index so people can now search by that on the front end - it will even return cases where people refer to the petition by id in other petition text.

@pixeltrix pixeltrix marked this pull request as ready for review April 26, 2021 18:59
By using the btree_gin extension and merging the indexes on the various
columns into a single index combined with state, debate_state and
parliament_id for archived petitions we can achieve a significant
performance gain of more than 10x when searching arbitrary text.

This also adds in the petition id to the index so people can now search
by that on the front end - it will even return cases where people refer
to the petition by id in other petition text.
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

Successfully merging this pull request may close these issues.

1 participant