Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-25 Thread xu fei
u --- On Mon, 1/25/10, Ivan Sergio Borgonovo wrote: From: Ivan Sergio Borgonovo Subject: Re: [GENERAL] FTS uses "tsquery" directly in the query To: pgsql-general@postgresql.org Date: Monday, January 25, 2010, 4:33 PM On Mon, 25 Jan 2010 23:35:12 +0300 (MSK) Oleg Bartunov wrote: > Do you

Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-25 Thread Ivan Sergio Borgonovo
On Mon, 25 Jan 2010 23:35:12 +0300 (MSK) Oleg Bartunov wrote: > Do you guys wanted something like: > > arxiv=# select and2or(to_tsquery('1 & 2 & 3')); > and2or > - > ( '1' | '2' ) | '3' > (1 row) Nearly. I'm starting from a weighted tsvector not from text/tsquery.

Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-25 Thread Oleg Bartunov
Do you guys wanted something like: arxiv=# select and2or(to_tsquery('1 & 2 & 3')); and2or - ( '1' | '2' ) | '3' (1 row) Oleg On Mon, 25 Jan 2010, Ivan Sergio Borgonovo wrote: On Mon, 25 Jan 2010 07:19:59 -0800 (PST) xu fei wrote: > Hi, Oleg Bartunov: > First th

Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-25 Thread Ivan Sergio Borgonovo
On Mon, 25 Jan 2010 07:19:59 -0800 (PST) xu fei wrote: > Hi, Oleg Bartunov: > First thanks for your quick replay. Could you explain it a little > more on "it's general limitation/feature"? I just confuse that > to_tsquery('item') function will return a tsquery type which is > same as 'item'::tsqu

Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-25 Thread xu fei
n FTS? If so, how? Thank!  Xu --- On Sun, 1/24/10, Oleg Bartunov wrote: From: Oleg Bartunov Subject: Re: [GENERAL] FTS uses "tsquery" directly in the query To: "xu fei" Cc: pgsql-general@postgresql.org Date: Sunday, January 24, 2010, 2:11 AM Xu, FTS has nothing with your prob

Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-23 Thread Oleg Bartunov
Xu, FTS has nothing with your problem, it's general limitation/feature. Oleg On Sat, 23 Jan 2010, xu fei wrote: Hi, everyone: First I can successful run this query:select name, ts_rank_cd(vectors, query) as rank from element, to_tsquery('item') query where query @@ vectors order by rank desc;