tsearch2: how to plainto_tsquery() with "|"

From: John Smith <jayzee(dot)smith(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: tsearch2: how to plainto_tsquery() with "|"
Date: 2014-03-25 20:40:35
Message-ID: CAMZ8qd9ycQoHGtPodJU9X6F8YDdKr43yrKiQw89+V4GNhujq8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

i can run "...@@ to_tsquery('cat | dog')".

but if i run "...@@ to_tsquery('cat dog')", it gives me a syntax error (#42601).

so i run "...@@ plainto_tsquery('cat dog')".

but then i can't run "...@@ plainto_tsquery('cat | dog')".

can you help before i give up on tsearch2?

thks, jzs

http://postgresql.1045698.n5.nabble.com/tsearch2-plainto-tsquery-with-OR-td1885955.html
http://www.postgresql.org/docs/9.3/static/textsearch.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-03-25 20:46:34 Re: tsearch2: how to plainto_tsquery() with "|"
Previous Message Joseph Kregloh 2014-03-25 17:25:05 Re: Upgrading from 9.2 to 9.3 causes performance degradation