Search Postgresql Archives

C function to create tsquery not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm still having trouble making this work:

http://pgsql.privatepaste.com/14a6d3075e

CREATE OR REPLACE FUNCTION tsvector_to_tsquery(IN tsv tsvector, op
IN char(1), weights IN varchar(4), maxpos IN smallint
	)
	RETURNS tsquery
	AS 'MODULE_PATHNAME'
	LANGUAGE C STRICT;

What I expect is:

tsvector_to_tsquery('java tano', '&', 'ABCD', 100) ->
java & tano

tsvector_to_tsquery('java:1A,2B tano:3C,4D', '&', 'ABC', 100) ->
java:A & java:B & tano:C

tsvector_to_tsquery('java:1A,2B tano:3C,4D', '|', 'ABC', 100) ->
java:AB | tano:C

I've made some improvement compared to previous version I've posted
but still it returns an empty tsquery.

Things that works:
- tsvector_tsquery_size returns reasonable total length of strings
  and total number of (operand + operator)
- curout is actually filled with a lexeme
- filters (wf, posmax) work



-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux