Re: TSearch and rankings - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: TSearch and rankings
Date
Msg-id 40279BC7.9060400@sigaev.ru
Whole thread Raw
In response to TSearch and rankings  ("Bas Scheffers" <bas@scheffers.net>)
Responses Re: TSearch and rankings  ("Bas Scheffers" <bas@scheffers.net>)
List pgsql-general

Bas Scheffers wrote:
> Hi,
>
> Is there a way to use tsearch so that it returns documents that have less
> than all the required keywords? The idea is that if a document only has 3
> out of 4 terms, it is still returned, but with a lower ranking.
>
> So far I haven't found a way to do this in the documentation. Is there
> something like a "maybe" operator? (ie: 'foo&bar&~doh', meaning documents
> with foo and bar, and optionaly doh, but those with would be ranked
> higher)



(foo&bar)|(foo&bar&doh)

I think, it's what you want.


--
Teodor Sigaev                                  E-mail: teodor@sigaev.ru

pgsql-general by date:

Previous
From: "Bas Scheffers"
Date:
Subject: TSearch and rankings
Next
From: "Bas Scheffers"
Date:
Subject: Re: TSearch and rankings