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

fix: Return only live pages from search promotions #533

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

kesara
Copy link
Member

@kesara kesara commented Jan 17, 2025

Fixes #532

Copy link
Member

@rjsparks rjsparks left a comment

Choose a reason for hiding this comment

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

I think we should consider this a patch fix.

The real issue is in some Page (or derived from Page) objects search that we've written not restricting things to .live() when they should and that may surface in other parts of the application, so we should hunt for how search_query as passed to get_search_promotions is being built and fix it at that point.

@kesara
Copy link
Member Author

kesara commented Jan 21, 2025

I think we should consider this a patch fix.

The real issue is in some Page (or derived from Page) objects search that we've written not restricting things to .live() when they should and that may surface in other parts of the application, so we should hunt for how search_query as passed to get_search_promotions is being built and fix it at that point.

I don't see any custom changes for search promotions.
For every search query www adds daily hit record:
https://github.com/search?q=repo:ietf-tools/www%20promotions&type=code#L15

Also, www hasn't been running periodic events for cleaning up daily search records1.
This could be the root cause but running this command manually didn't help the search results. But there are few other periodic tasks www.ietf.org should be running, so that has be to addressed.

Footnotes

  1. https://docs.wagtail.org/en/v6.3.2/reference/contrib/searchpromotions.html#searchpromotions-garbage-collect

@kesara kesara merged commit cd36a6a into ietf-tools:main Jan 21, 2025
5 checks passed
@kesara kesara deleted the fix/search-promotions branch January 21, 2025 23:10
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.

unpublished pages should not appear in wagtail search results
2 participants