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

Case-sensitive search results would be good for technical projects #1534

Closed
rptb1 opened this issue Oct 20, 2023 · 1 comment
Closed

Case-sensitive search results would be good for technical projects #1534

rptb1 opened this issue Oct 20, 2023 · 1 comment
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@rptb1
Copy link

rptb1 commented Oct 20, 2023

Problem

It would be useful to have search results respect case for technical projects that include case-sensitive identifiers. For example, it would be good if non-case-matching results downranked so that they don't intrude on better matches.

Something might be done by adding a case-sensitive search, but I suspect this could be done better by improving the ranking of results.

Reproducible Project

Found during formal inspection of transition to documentation of the Memory Pool System to Read the Docs. See Ravenbrook/mps#166 (review) .

To reproduce, visit https://memory-pool-system--166.org.readthedocs.build/en/166/ and search for "pin" (a technical term used in our system) and note that the first results you get are irrelevant matches for e.g. "MutatorContextCanStepInstruction".

Error Logs/Results

image

Expected Results

When searching for "pin", pages which match "pin" as a whole word (in lower case) should be presented as the best matches. Stemmed matches such as "pins", "pinned", or "unpin" would be nice too.

Pages with the word "pin" matching with differing case should be ranked lower down.

Pages with the string "pin" matching only as a substring (e.g. in "StepIn") should be ranked even lower.

Environment Info

  • Python Version: Read the Docs current
  • Sphinx Version: Read the Docs current
  • RTD Theme Version: Read the Docs current
@rptb1
Copy link
Author

rptb1 commented Oct 22, 2023

Digging a bit deeper, it looks like the Read the Docs theme is just using a build-in search from Sphinx, so this isn't the right project for this issue. I'll move it to https://github.com/sphinx-doc/sphinx/issues and keep digging for solutions.

Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
Development

No branches or pull requests

1 participant