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
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
The text was updated successfully, but these errors were encountered:
bradumbaugh
changed the title
Filter lunr.js stopwords from the 'missing section' of each search result
Filter lunr.js stopwords from the 'Missing' section of each search result
Dec 12, 2021
I had some time on my hands and fixed it right away. Starting with fdfe150f4 stopwords are now removed from the list of missing terms. I also noticed this some time ago but forgot about it, so I'm glad we finally fixed it as it was really annoying.
As an additional note, showing this was filtered because it's a stopword might lead to more confusion than it helps. Most users will not search for stopwords, but for single keywords, at least that's what I'm seeing on the docs.
Contribution guidelines
I want to suggest an idea and checked that ...
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
The text was updated successfully, but these errors were encountered: