You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However: there is a bug. The code uses the variable named word that relates to one of the words from the user's original query (philos in the repro case provided below) instead of the partially-matching title term found in the index (philosphi -- the i suffix is not a typo, that's due to term stemming).
How to Reproduce
Self-construct the Sphinx project's HTML documentation from commit 5745199 and host this using a local webserver (for example, by running python -m http.server -b 127.0.0.1 from the documentation build output directory).
Visit the locally-hosted project documentation using a web browser, and perform a search (keyboard shortcut: /) for the term philos.
jayaddison
changed the title
[HTML search] partially-matched titles are not included in search results.
HTML search: partially-matched titles are not included in search results.
Mar 14, 2024
jayaddison
changed the title
HTML search: partially-matched titles are not included in search results.
HTML Search: partially-matched titles are not included in search results.
Mar 14, 2024
Describe the bug
As-written, the search code for Sphinx appears intended to give a score of
7
to partial-matches of the user query against document titles. This compares to a score of15
when one of the terms from the user query matches a title term exactly.However: there is a bug. The code uses the variable named
word
that relates to one of the words from the user's original query (philos
in the repro case provided below) instead of the partially-matching title term found in the index (philosphi
-- thei
suffix is not a typo, that's due to term stemming).How to Reproduce
Self-construct the Sphinx project's HTML documentation from commit 5745199 and host this using a local webserver (for example, by running
python -m http.server -b 127.0.0.1
from the documentation build output directory).Visit the locally-hosted project documentation using a web browser, and perform a search (keyboard shortcut:
/
) for the termphilos
.Expected outcome: the
Appendix: Deploying a Sphinx project online
tutorial should be listed in the search results.Actual outcome: the tutorial is not included in the search results.
Environment Information
Sphinx extensions
Additional context
Discovered during code review of #11958.
The text was updated successfully, but these errors were encountered: