Sorting results

Hi, for a recipe app, I would like to fetch recipes and sort them by the ones having the most ingredient specified in filters or facetFilters, is it possible?

ex:

recipe 1: olive oil, bacon, salad
recipe 2: salad, zucchini, tomato

I send this list of ingredients “Olive oil, bacon, salad, Egg, Sweet potatoes, Butter, olive, Carrot, pasta, fries, ham, cheese, paprika, Onions, Red pepper, Dijon mustard, parsley, Chicken breasts”

recipe 1 (3/3) will come 1st in the result because all its ingredients were specified in the filters
recipe 2 has only 1/3 ingredients in the filters therefore it is displayed after recipe 1

Thank you