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
Midway through development, we had a matches counter. Unfortunately the search engine we used (Elasticlunr.js) doesn't tell you how many matches it found for the search query (or constituent terms), only a score based on a "very perfect scoring mechanism". So we made our own implementation, counting the matches for the entire search query and displaying it under the heading (alongside breadcrumbs at the time)
However, this didn't account for matches in the title, nor for matches of each of the individual search terms when there were multiple. It should be possible to extend the functionality to achieve this, similar to how the match highlighting has been extended, however the results may still be confusing. The "very perfect scoring mechanism" means that the results are not ordered by a simple count, but some more sophisticated measure of relevance. This means that there might be a result that's higher up than a result with a greater number of matches
In the end, we removed the counter, but it's one to think about
For consideration
Could we do something with the Elasticlunr.js score, or should we implement a more complex (than the one used mid-development) counter of our own, looking at all matches for all terms within the search query, both within the content and the page title?
The text was updated successfully, but these errors were encountered:
In addition to a match counter, I wonder if a 'missing: ' would be useful under each result? I use this quite often on google search to decide whether a link is useful. For example see the screenshot attached from Beautiful Canoe docs, which has both this info and a match counter.
Original search PR: #984
Background
[mostly copied from the original search PR]
Midway through development, we had a matches counter. Unfortunately the search engine we used (Elasticlunr.js) doesn't tell you how many matches it found for the search query (or constituent terms), only a score based on a "very perfect scoring mechanism". So we made our own implementation, counting the matches for the entire search query and displaying it under the heading (alongside breadcrumbs at the time)
However, this didn't account for matches in the title, nor for matches of each of the individual search terms when there were multiple. It should be possible to extend the functionality to achieve this, similar to how the match highlighting has been extended, however the results may still be confusing. The "very perfect scoring mechanism" means that the results are not ordered by a simple count, but some more sophisticated measure of relevance. This means that there might be a result that's higher up than a result with a greater number of matches
In the end, we removed the counter, but it's one to think about
For consideration
Could we do something with the Elasticlunr.js score, or should we implement a more complex (than the one used mid-development) counter of our own, looking at all matches for all terms within the search query, both within the content and the page title?
The text was updated successfully, but these errors were encountered: