Re: Rank based on the number of matching OR fields?

From: François Beausoleil <francois(at)teksol(dot)info>
To: "W(dot) Matthew Wilson" <matt(at)tplus1(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rank based on the number of matching OR fields?
Date: 2012-09-25 18:48:17
Message-ID: DB506A88-B843-426C-96AC-05284B8804FD@teksol.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Le 2012-09-25 à 14:16, W. Matthew Wilson a écrit :

> I want to run a query like to_tsquery("A | B | C") and then rank the
> results so that if a document contained A, B, and C, then it would
> rank above a document that just had some subset.
>
> How would I do such a thing?

http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

Hope that helps,
François Beausoleil

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scot Kreienkamp 2012-09-25 19:23:35 idle in transaction query makes server unresponsive
Previous Message W. Matthew Wilson 2012-09-25 18:16:27 Rank based on the number of matching OR fields?