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 force-pushed the optimize-searching branch from a5a9be7 to 36b7a69 Compare April 26, 2021 18:50
@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.
@pixeltrix pixeltrix force-pushed the optimize-searching branch from 36b7a69 to 1370cc8 Compare April 28, 2021 16:45
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