10BC0 Filter lunr.js stopwords from the 'Missing' section of each search result · Issue #3343 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Filter lunr.js stopwords from the 'Missing' section of each search result #3343

@bradumbaugh

Description

@bradumbaugh

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

As suggested, filing an issue for discussion #3342.

screenshot

As shown by the above screenshot from the live MkDocs Material site, when a user enters a search term that lunr.js treats as a stopword, search results can indicate that the word is "missing" from the result even when it's actually there. This can be a little confusing, especially when the snippet shown by the search preview happens to include that stopword.

Can lunr.js stopwords be filtered from the 'missing' section?

Another, related idea: explicitly indicate that particular words have been excluded from the search (i.e., an 'Excluded: when, is, and') if/when a user searches on them. I don't know, though — even as I type that it out it seems a little heavy-handed (and it'd get repetitive to see that same info on each search result).

Use Cases

This is obviously not a major problem. That said, fixing it might prevent users from getting confused when a search result says that a word is missing, when in fact that same word is visible right in the same search result.

The primary benefit here would be to prevent any loss in trust that might arise from the search UI indicating something that isn't true.

Screenshots / Mockups

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0