List filtering - most to least matches

If I am on the same page with the original poster, I believe the issue we are having is that we want to sort a list of objects by comparing them to the user’s chosen criteria.

For example, if a hotel booking app has three hotels with various special accomodations:
Hotel A: Pool, Beach, Park
Hotel B: Park, Beach
Hotel C: Pool, Spa

If a user selects the options “Pool” and “Spa”, the hotels should be displayed in this order:

  1. Hotel C (2 matches)
  2. Hotel A (1 match)

Hotel B should be excluded because it has zero matches to the chosen options by the user.

I have seen your cloneable “Bondbae” app that you worked on, and it is very close to what I think we are looking for, but I believe your app sorts from smallest number of matches to largest number of matches, while we are looking for the opposite order, largest number of matches to smallest.

I hope this clarifies in a way that can get us closer to a solution.