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

Don't facet on things that will be ignored #1174

Merged
merged 1 commit into from
Jun 7, 2019
Merged

Conversation

sihugh
Copy link
Contributor

@sihugh sihugh commented Jun 6, 2019

Piggy backs off #1172

Faceting on things that are populated from local registries just adds load to the system for no benefit.

On a search from https://www.gov.uk/search/all we go from a query like:

https://www.gov.uk/api/search.json?count=20&start=0&fields=title%2Clink%2Cdescription%2Cpublic_timestamp%2Cpopularity%2Ccontent_purpose_supergroup%2Cformat%2Cpart_of_taxonomy_tree%2Cmanual%2Corganisations%2Cpeople%2Cworld_locations&q=government&reject_link[]=%2Fsearch%2Fall&facet_manual=1500%2Corder%3Avalue.title&facet_organisations=1500%2Corder%3Avalue.title&facet_people=1500%2Corder%3Avalue.title&facet_world_locations=1500%2Corder%3Avalue.title&filter_all_part_of_taxonomy_tree[]&filter_all_part_of_taxonomy_tree[]

to

https://www.gov.uk/api/search.json?count=20&start=0&fields=title%2Clink%2Cdescription%2Cpublic_timestamp%2Cpopularity%2Ccontent_purpose_supergroup%2Cformat%2Cpart_of_taxonomy_tree%2Cmanual%2Corganisations%2Cpeople%2Cworld_locations&q=government&reject_link[]=%2Fsearch%2Fall&filter_all_part_of_taxonomy_tree[]&filter_all_part_of_taxonomy_tree[]

which is a reduction in response payload from 559kb to 29.5kb, and in response time
from ~650ms to ~250ms (cold) and from ~200ms to ~25ms (warm - ie submitting
the same query to search-api again).

I deployed this to staging for a test - the initial low period is because traffic replay was not hitting finder frontend.
The high spike is current master, and the low part afterwards is the improvement due to this PR being deployed.
Screenshot 2019-06-07 09 38 31

I'm all for dynamic faceting, but we should only use it when it's useful.


Search page examples to sanity check:

Other finders

@benthorner benthorner temporarily deployed to finder-frontend-pr-1174 June 6, 2019 16:47 Inactive
@sihugh sihugh marked this pull request as ready for review June 6, 2019 16:54
@sihugh sihugh changed the title Don't facet on things that will be ignored [WIP] Don't facet on things that will be ignored Jun 6, 2019
@benthorner benthorner temporarily deployed to finder-frontend-pr-1174 June 6, 2019 18:09 Inactive
@benthorner benthorner temporarily deployed to finder-frontend-pr-1174 June 6, 2019 18:54 Inactive
@sihugh sihugh changed the title [WIP] Don't facet on things that will be ignored Don't facet on things that will be ignored Jun 7, 2019
Copy link
Contributor

@bilbof bilbof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Nice work.

@sihugh sihugh merged commit 28ae10a into master Jun 7, 2019
@sihugh sihugh deleted the track-facets-part-2 branch June 7, 2019 09:18
@sihugh
Copy link
Contributor Author

sihugh commented Jun 7, 2019

Thanks Bill!

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.

3 participants