Re: tsearch (or related) question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Satoshi Nagayasu <satoshi(dot)nagayasu(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch (or related) question
Date: 2011-01-14 17:14:21
Message-ID: 7700.1295025261@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Satoshi Nagayasu <satoshi(dot)nagayasu(at)gmail(dot)com> writes:
> I want to hit a row when I use 'a&b' or 'b&c' in a tsquery,
> but not 'a&c'.

Wouldn't this do it?

tsvectorcol @@ '(a&b | b&c) & !(a&c)'

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-01-14 17:55:43 Re: Record with a field consisting of table rows
Previous Message Vick Khera 2011-01-14 16:49:33 Re: Question about concurrent synchronous and asynchronous commits