Re: Re: Matching and Scoring with multiple fields
От
Ed Loehr
Тема
Re: Re: Matching and Scoring with multiple fields
Дата
Msg-id
396A409C.520CCDA@austin.rr.com
Список
Дерево обсуждения
Re: Matching and Scoring with multiple fields "Tim Johnson" <tim@lincolnshirenow.com>
Re: Re: Matching and Scoring with multiple fields Oliver Mueschke <o@mueschke.de>
RE: Re: Matching and Scoring with multiple fields "Tim Johnson" <tim@celestialdesign.co.uk>
Tim Johnson wrote: > > I have a table like this: > > a,b,c,d,e,f,g,h > --------------- > 2,5,3,4,4,5,2,2 > 1,1,1,1,1,1,1,1 > > a to h are of type int. > > I want to take input values which relate to this table say: > how do you feel about a: > how do you feel about b: > how do you feel about c: > ... > > and the answers will be 1 to 5. > > Now I want to take those answers for my incoming a to h and scan down the > table pulling out the closest matches from best to worst. I wonder if you don't really just want to find the vector(s) closest in N-space to the input vector. You might dig up an old 3-variable calculus book, find the formula, and write a PL/pgSQL function to compute the distance between two N-dimensional vectors... Regards, Ed Loehr
В списке pgsql-sql по дате отправления