-
-
Notifications
You must be signed in to change notification settings - Fork 993
Made typos in docs searches return some results. #1930
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
Conversation
9945f26
to
9d4d28d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use Trigram for handling misspelling cases, but it was on the long list of things to improve, so thanks for working on that.
46e930b
to
ef21dd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to test it locally to make sure I was proposing a solution that was as efficient as before. :)
I noticed that we were annotating the search rank without needing to show it, so I used "alias" and proposed the minimum number of code changes to have the suggested results in the list.
The SQL code generated with the suggested changes is slightly different but equally efficient and no longer produces the rank in output since it was not shown.
I restored the unmodified code with the previous formatting to make it easier to consult the Git history.
d078a09
to
1adfdb9
Compare
Sorry @sarahboyce if I'm replying only now. Thanks for continuing this PR, I tried to think better about the goal we want to achieve, and I opened the issue #1932 The goal I had in mind was to improve the current query, which I had created in the past, trying to maintain efficiency. |
1adfdb9
to
96b1e8d
Compare
Co-authored-by: Paolo Melchiorre <[email protected]>
71be298
to
b123de5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for so many updates in your PR.
When looking into #1347, there is a suggestion that we should show search results for "databasess" instead of a 404. However, this currently returns no results: https://docs.djangoproject.com/en/5.1/search/?q=databasess
Our search isn't very forgiving for spelling errors (not a "fuzzy" search).
As a suggestion, I think we can return some results that have a ranking instead of returning no results.
Fixes #1932