Ok, for this question I need idea how to make an algorithm for sorting results.
Let me explain a problem:
i have different dish recipes (more than 2000) consists of different ingredients.
having 3 tables:
dish
id | name
ingredient
id | name
dish_ingredient
id | id_dish | id_ingredient
Application i made let users select different ingredients they have and app shows them proper dish recipe sort by count of ingredients they have. Now I would like to have algorithm where users would select ingredients and add them some kind of "weight".
Example which works for now: if user select ingredients beef, carrots, onion, salt, pepper algorithm looks which recipes has these ingredients (not necessary all of them) and sort them by ingredients that user has. So first recipe from this sorting could have just salt and then maybe flour and eggs (recipe for pancakes) at the end of list there could be recipes with beef which are more convenient for user.
So my idea is that user could add some weights on his ingredients so search algorithm would give him more proper recipes. If you do not understand what i want, you could see application on www.mizicapogrnise.si (transalate it from Slovenian language to your language) to see how app works now.
Thanks for all your help.