tsearch2: plainto_tsquery() with OR?

From: cluster <skrald(at)amossen(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch2: plainto_tsquery() with OR?
Date: 2007-08-07 09:19:52
Message-ID: f99dfk$p6f$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have some questions related to tsearch2:

1) Is
...WHERE rank(myTsVector, myTsQuery) > 0 ...
just as fast as
...WHERE myTsVector @@ myTsQuery...
?

2)) I will use plainto_tsquery() to parse search keys entered by a
website user to a tsquery. However, if only some of the entered keywords
does not exist in the searched tsvectors (but others do), I would still
like the search result to be "true".
plainto_tsquery() glues each keyword together with "&". I search for a
plainto_tsquery() that glues the keywords with an "|" (the OR operator).
In that way, not ALL keywords are required to exist in the tsvector in
order for the row to be returned,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nis Jørgensen 2007-08-07 10:23:00 Re: finding reusable ids
Previous Message Sergei Shelukhin 2007-08-07 08:17:56 Re: finding out vacuum completion %, and vacuum VS vacuum full