sort by percent matched - Mailing list pgsql-general

From Thomas T. Thai
Subject sort by percent matched
Date
Msg-id Pine.NEB.4.21.0109282240580.4176-100000@ns01.minnesota.com
Whole thread Raw
Responses Re: sort by percent matched
List pgsql-general
say i have two tables. table 1 is cars with features. table 2 is pretty
much the same as table 1, but it's for features people are looking for in
used cars.

table1: used cars
exterior_color
interior_color
transmission
am_fm
power_window
...

table2: used cars features people are looking for
exterior_color
interior_color
transmission
am_fm
power_window
...

instead of doing a query to match table2 to table1 exactly, i would like
to match it based on and sorted by percent matched. so if a person was
looking for a blue, am/fm, power window car, but there isn't one exactly
like that. instead there is one that's RED, am/fm, power window. it would
turn up as a result, but it wouldn't be 100%, but say 90%.

how do i set that up so that the results can be returned by percent
matched?


pgsql-general by date:

Previous
From: Arcady Genkin
Date:
Subject: Re: Authenticating user `postgres'
Next
From: Masaru Sugawara
Date:
Subject: Re: Function Help