Re: How to use Logical Operators in Fulltext Search?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaini Rajeshwar <raja(dot)rajeshwar2006(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to use Logical Operators in Fulltext Search?
Date: 2009-10-21 13:42:23
Message-ID: 27025.1256132543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gaini Rajeshwar <raja(dot)rajeshwar2006(at)gmail(dot)com> writes:
> I am doing a fulltext search something like this:

> SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) OR
> tsv_body($$'magnetic induction'$$) OR tsv_abstract($$'abstract'$$)

Since you haven't told us what those functions do, we're just guessing.
But I would suggest that if you can use | within a single tsquery,
it'll probably run faster.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-10-21 14:39:31 Re: How to send multiple parameters to a pl/pgsql function
Previous Message Tom Lane 2009-10-21 13:37:53 Re: Index Scan/Bitmap Index Scan for queries with FTS and ORDER+LIMIT