pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: Mitch Vincent <mitch@venux.net>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Weighted Searching
Date: Wed, 13 Sep 2000 06:07:00 +0300 (GMT)
Message-ID: <Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra> (raw)
In-Reply-To: <005901c01cd5$9b67b250$0200000a@doot>

We did fulltext search using relevancy function implemented as SPI 
postgres mechanism. We use coordinate information of words in text to
calculate weights. I'm harry right now, because is going to airport,
sorry, couldn't give any details.

	Regards,

		Oleg
On Tue, 12 Sep 2000, Mitch Vincent wrote:

> Date: Tue, 12 Sep 2000 09:22:12 -0700
> From: Mitch Vincent <mitch@venux.net>
> To: pgsql-general@postgresql.org
> Cc: pgsql-sql@postgresql.org
> Subject: [SQL] Weighted Searching
> 
> I emailed the list a while back about doing some weighted searching, asking
> if anyone had implemented any kind of weighted search in PostgreSQL.. I'm
> still wondering the same thing and if anyone has, I would greatly appreciate
> a private email, I'd like to discuss it in detail.. I have several ideas but
> most of them are pretty dirty and slow..
> 
> What I need to do is allow the user to assign weights to fields and then
> specify a minimum weight which would dictate results..
> 
> Example :
> 
> A search on two fields, degree and years_experience, location_state.
> 
> The user assigns degree a weight of 10, years_experience a weight of 10 and
> location_state a weight of 10. Then specifies the minimum weight as 20,
> meaning that any results returned would have to have at least two of the
> fields an exact match (any two that where the sum of the weight equals 20).
> This could be carried out to many, many fields and extremely high weights..
> 
> The problem I'm having is figuring out a good way to assign the weights to
> individual fields and test to see if an individual field is exactly matched
> in the query (without running a single query for each field searched on.
> 
> Example:
> 
> The SQL query for the search above might be :
> 
> SELECT * FROM people WHERE degree='MBA' and years_experience='5' and
> location_state='Arizona'
> 
> I would want people that have an MBA and 5 years experience but they
> wouldn't necessarily have to be in Arizona (because our minimum weight is
> 20, only two would have to match)..
> 
> Hopefully I'm not over-explaining to the point of confusion.. If anyone
> would have any ideas, please drop me an email.. Thanks!!!
> 
> -Mitch
> 
> 
> 
> 
> 

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




view thread (4+ messages)

Message-ID: <Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra>
Permalink:  ../Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra/
Also on:    postgresql.org/message-id/Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: oleg@sai.msu.su, mitch@venux.net, pgsql-general@postgresql.org
  Subject: Re: [SQL] Weighted Searching
  In-Reply-To: <Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra>
  References: <005901c01cd5$9b67b250$0200000a@doot> <Pine.GSO.3.96.SK.1000913060434.13300A-100000@ra>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox