Rank based on the number of matching OR fields?

From: "W(dot) Matthew Wilson" <matt(at)tplus1(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Rank based on the number of matching OR fields?
Date: 2012-09-25 18:16:27
Message-ID: CAGHfCUBOx=JLUD66xe+X=tD64VfdNa+mEosry-_ms0smqeetJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

--
W. Matthew Wilson
matt(at)tplus1(dot)com
http://tplus1.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message François Beausoleil 2012-09-25 18:48:17 Re: Rank based on the number of matching OR fields?
Previous Message Andreas Joseph Krogh 2012-09-25 17:37:38 Re: unique constraint with significant nulls?