Non-obvious search behavior for several matching substrings

Background. I have a component named ‘i/24/outlined/image’, where ‘image’ is a title of an icon. I’ve noticed that this icon is not displayed in the search results of the Swap Instance widget, when I type ‘image’ into the search field.

Some sort of investigation made me realize that the actual reason is that all my icons are wrapped into a frame named ‘iconImages’. It seems that all nested icons are considered to be relevant search results for the ‘image’ request, so the expected result is just lost somewhere in the middle of the list.

My proposal is to make search a bit more sensitive, so that

  • direct matches within the name are more relevant than matches within the whole path,
  • item containing several matches is more relevant than the item with a single match.

In my particular case that would mean that

iconImages/i/24/outlined/image

is higher (more relevant) than just

iconImages/i/24/outlined/whatever

P.S. I’m not 100% sure that I’ve found the right reason of a case. However, can’t imagine anything else yet.

Thanks for reading this!