Re: tsearch2: plainto_tsquery() with OR? - Mailing list pgsql-general

From Ron Mayer
Subject Re: tsearch2: plainto_tsquery() with OR?
Date
Msg-id 46C06E48.6090904@cheapcomplexdevices.com
Whole thread Raw
In response to Re: tsearch2: plainto_tsquery() with OR?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> Oleg Bartunov <oleg@sai.msu.su> writes:
>> On Wed, 8 Aug 2007, cluster wrote:
>>> Does anyone know where I can request an OR-version of plainto_tsquery()?
>
>> plainto_tsquery expects plain text, use to_tsquery for boolean operators.
>
> Are either of these definitions really right?  If I type "foo bar baz"
> into Google, for instance, it seems to produce some sort of weighted
> result, neither a strict AND nor a strict OR.  Google didn't get where
> they are by misjudging what the simplest search behavior should be like.


For what it's worth, Google states [1]

   Automatic "and" queries

   By default, Google only returns pages that include
   all of your search terms. There is no need to
   include "and" between terms. Keep in mind that
   the order in which the terms are typed will affect
   the search results. To restrict a search further,
   just include more terms. For example, to plan a
   vacation to Hawaii, simply type vacation hawaii.

and also describes "OPERATOR EXAMPLE...vacation hawaii"
as "FINDS PAGES CONTAINING...the words vacation and Hawaii".

If I'm not mistaken, it sounds the same as what tsearch describes.


[1] http://www.google.com/intl/en/help/basics.html#and
[2] http://www.google.com/intl/en/help/cheatsheet.html


pgsql-general by date:

Previous
From: Jeff Lanzarotta
Date:
Subject: Re: Selecting rows where timestamp between two timestamps
Next
From: Erik Jones
Date:
Subject: Re: Persistent connections in PHP