[GENERAL] OR tsquery

2010-01-16 Thread Ivan Sergio Borgonovo
to_tsquery and plainto_tsquery produce AND tsquery 'apple banana orange' - 'apple' 'banana' 'orange' I can't see anything that will produce OR tsquery. 'apple banana orange' - 'apple' | 'banana' | 'orange' The only thing I can think of is looping on ts_lexize that looks not very efficient in

Re: [GENERAL] OR tsquery

2010-01-16 Thread Tom Lane
Ivan Sergio Borgonovo m...@webthatworks.it writes: to_tsquery and plainto_tsquery produce AND tsquery 'apple banana orange' - 'apple' 'banana' 'orange' Only the latter. Try to_tsquery again: regression=# select to_tsquery('foo bar'); ERROR: syntax error in tsquery: foo bar regression=#

Re: [GENERAL] OR tsquery

2010-01-16 Thread Oleg Bartunov
Ivan, did you ever read official documentation ? http://www.postgresql.org/docs/8.4/static/textsearch-controls.html Oleg On Sat, 16 Jan 2010, Ivan Sergio Borgonovo wrote: to_tsquery and plainto_tsquery produce AND tsquery 'apple banana orange' - 'apple' 'banana' 'orange' I can't see

Re: [GENERAL] OR tsquery

2010-01-16 Thread Ivan Sergio Borgonovo
On Sat, 16 Jan 2010 19:10:45 +0300 (MSK) Oleg Bartunov o...@sai.msu.su wrote: Ivan, did you ever read official documentation ? http://www.postgresql.org/docs/8.4/static/textsearch-controls.html Yes but I still can't find something that works like plainto_tsquery but with | or any example