Relevancy search across multiple item types related to each other

Are there existing best practices on how to display search results across different items that have multiple relationships (sometimes hierarchical).

For example, the following has:

  • asset groups (hundreds)
  • assets (hundreds of thousands)
  • characteristic (hundreds)
  • instances of that characteristic (under 5)

For example, macbook pro can be an asset. New York computers is an asset group that macbook pro is in. Macs is also an asset group with macbook pro.

Searching for "mac" should return results in order of most relevant to least relevant

  1. macs
  2. macbook pro
  3. New York computers

How to best demonstrate that those search results are different item types? Are there other websites that have done this successfully?

Scaling this to 4 is the goal, but just trying to wrap my head around 2 item types.

Examples Spotify example

Mac OS Finder example