Re: FTS uses "tsquery" directly in the query
От | Ivan Sergio Borgonovo |
---|---|
Тема | Re: FTS uses "tsquery" directly in the query |
Дата | |
Msg-id | 20100125223327.78b33002@dawn.webthatworks.it обсуждение исходный текст |
Ответ на | Re: FTS uses "tsquery" directly in the query (Oleg Bartunov <oleg@sai.msu.su>) |
Ответы |
Re: FTS uses "tsquery" directly in the query
|
Список | pgsql-general |
On Mon, 25 Jan 2010 23:35:12 +0300 (MSK) Oleg Bartunov <oleg@sai.msu.su> 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. I would like to: - keep the weights in the query - avoid parsing the text to extract lexemes twice (I already have a tsvector) For me extending pg in C is a new science, but I'm actually trying to write at least a couple of functions that: - will return a tsvector as a weight int, pos int[], lexeme text record - will turn a tsvector + operator into a tsquery 'orange':A1,2,3 'banana':B4,5 'tomato':C6,7 -> 'orange':A | 'banana':B | 'tomato':C or eventually 'orange':A & 'banana':B & 'tomato':C thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it
В списке pgsql-general по дате отправления: