| From: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | parser: tokens in tsearch2 |
| Date: | 2008-10-18 16:31:34 |
| Message-ID: | 20081018183134.3c67a6a3@dawn.webthatworks.it |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I need to "glue" codes to "concatenate" them as a single lexeme to
other tsvectors in a way that a code won't be split but will remain
one lexeme.
eg. if input is "ab12 456/z7_92$44'a37" I don't want it get parsed
into
{ab12} {456} {z7} {92} {44} {a37}
but I want to keep the highest possible number of "symbols" in the
string so that it ends up in something like:
{ab12456/z792$44'a37}
So I need to know where the parser will cut a string so I can
_code:=regexp_replace(_code,'[/$ \t-]','');
replacing the minimum number of characters to avoid _code get split
in more than one lexeme.
thanks
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lucazeo | 2008-10-18 18:38:43 | IS NULL seems to return false, even when parameter is NULL |
| Previous Message | Daniel Verite | 2008-10-18 10:37:38 | Re: auto insert data every one minute |