Skip to content

Case- and space-aware search results would be good for technical projects #11732

@rptb1

Description

@rptb1

Is your feature request related to a problem? Please describe.

Search results start with irrelevant results that could be noticed by matching case, or noticing spacing.

For example:

image

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".

Describe the solution you'd like

It would be useful to have search results respect case for technical projects that include case-sensitive identifiers.

It would be good if non-case-matching results downranked so that they don't intrude on better matches.

For example, 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.

Describe alternatives you've considered

We will investigate the Sphinx search code. We want the offline search ability so we don't want to consider an external search engine, or leak customer searches to e.g. Google. We welcome pointers or advice are welcome on this issue.

Additional context

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

Originally raised as readthedocs/sphinx_rtd_theme#1534 but moved to https://github.com/sphinx-doc/sphinx/issues .

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions