Search Postgresql Archives

Re: tsearch2: plainto_tsquery() with OR?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
> Oleg Bartunov <oleg@xxxxxxxxxx> 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


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux