Show all matches in search result by default + toggle

Use case or problem

Sometimes, the keyword searched for appears in several parts of a note. When searching for this keyword, the search results only show the first match per note with a clickable “and x more matches”.

While this might be ideal if the keyword is present in a lot of separate notes, an expanded search result readily showing all matches may be best in some cases (ex: few keyword-rich notes).

Proposed solution

All matches are shown in the search results by default and there’s a toggle button that reverts to current behavior (showing just the first match per note with link to other matches).

In the future, it might be possible that the search pane adapts to the search results (i.e. If matches are few, all matches are shown. If keyword is in >x documents, use current behavior).

Related feature requests (optional)

This is similar to the #3 example in Proposed Solution in Feature Request: Optimizing Utility of Search - Possible Setting? but the example wasn’t implemented.