select ts_rewrite(
to_tsquery('java:A & cola & java:AB'),
'java:AB'::tsquery,
'java:AB'::tsquery);
ts_rewrite
--------------------------------
'cola' & 'java':AB & 'java':AB
Is this the expected (documented) result?
I found this while looking for a way to build up a tsquery directly
in it's own structure without passing through its text
representation (and maybe reduce it).
The following looks equivalent. Are they?
test=# select 'java:ABC'::tsquery;
tsquery
------------
'java':ABC
(1 row)
test=# select 'java:A | java:B | java:C'::tsquery;
tsquery
------------------------------------
( 'java':A | 'java':B ) | 'java':C
(1 row)
I did try to pass them through nodetree... but the result keeps on
being different.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it