-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
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.
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
