Re: Question about fulltext search and to_tsvector function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Christensen <imaudi(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about fulltext search and to_tsvector function
Date: 2008-10-17 03:37:25
Message-ID: 7565.1224214645@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Christensen <imaudi(at)comcast(dot)net> writes:
> Okay this one's driving me crazy.
> Should there be any difference between the following queries:

> SELECT R.Title FROM Recipes R
> WHERE (to_tsvector('english', title || description) @@
> plainto_tsquery('Cake'));

> and

> SELECT R.Title FROM Recipes R
> WHERE (to_tsvector('english', description || title) @@
> plainto_tsquery('Cake'));

Maybe it would be better to do description || ' ' || title ?
I suspect that 'Cake' is getting run together with some other
word in some of your rows ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-10-17 03:40:08 Re: Question about NOT NULL and default values.
Previous Message Scott Marlowe 2008-10-17 03:36:15 Re: Question about NOT NULL and default values.