4 ms·
Many search engines default to returning hits when at least 1 keyword match. Not returning any results just because not every single keyword could be matched le
by molf 4y ago
Many search engines default to returning hits when at least 1 keyword match. Not returning any results just because not every single keyword could be matched leads to a poor user experience. However, good relevance scoring is key here. Hits that match most keywords should be somewhere at the top. The reasoning is that a user will try to find the result they are looking for in the top hits.
In the case of MiniSearch you can change this default and configure it to only return hits if all keywords match [0].
Searching for "super ma" seems like an autocomplete query, for which most users have subtly different expectations than regular search. MiniSearch has a separate method for that, essentially baking in different default settings. [1]
[0] https://lucaong.github.io/minisearch/classes/_minisearch_.minisearch.html#combine-with-and https://lucaong.github.io/minisearch/classes/_minisearch_.mi...
[1] https://lucaong.github.io/minisearch/classes/_minisearch_.minisearch.html#autosuggest https://lucaong.github.io/minisearch/classes/_minisearch_.mi...
Edit:
> s/everything/anything
No need for the sneer.
- leeoniya 4y agook, thanks for the advice. i'll see if the MiniSearch settings can be improved for this demo without drastically affecting the quality of the "search" case.