I am facing a situation where I want to get the best match for a user search request. I will provide an example (little abstract):
We have a table with lawyers:
Namespace Royal Family Law Criminal Law ------ - ------------------------------------------------ ---- The lawyer is a Berlin 100 ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, / hour false truth lawyer B. Amsterdam ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, ¢ / Truth True A user should now be able to search by many features, weight of each feature should be of some type parameter Be it There are many such features in the table in my case (location, royalty, 20+ boolean values). The result should definitely yield results "good" but should be ordered by any kind of "score", so the best result is shown on top.
I'm not looking out of the box solution from some introduction of this topic.
Kind regards,
Matt
one The general approach is to specify the weight for each item, and add them when they match.
Berlin's inputs, & gt; 100 / hour, criminal law = truth, family law = zero (no norms) and place match has a weight. 5 of
choose (from * select *, case when location = 'Berlin' then 5 and 0 end + case when royality> = 100 then 1 and 0 end + case when familylaw = Null then 1 and 0 end + case when Criminal = true scores as a score from 1 and 0 TBL) Score score
Comments
Post a Comment