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 feeling lucky #1130

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Fix feeling lucky #1130

merged 3 commits into from
Apr 19, 2024

Conversation

pantherman594
Copy link
Contributor

Feeling lucky (a search query with a standalone bang) was returning 404 because it was trying to redirect to the maps link. This PR runs the result cleaning first to get the results in a consistent state and apply any URL rewriting, and excludes internal links from the results. It also skips past any details sections because those links are probably not the ones a user would be looking for. Finally, I let the feeling lucky fall back to return normal search results, in case something went wrong looking for a link.

Test was updated to verify that the correct redirection link was found.

@benbusby benbusby merged commit f18bf07 into benbusby:main Apr 19, 2024
3 checks passed
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.

2 participants