| From: | Asmir Mustafic <asmir(at)lignano(dot)it> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Full text and removing dashes from names |
| Date: | 2013-02-21 17:34:44 |
| Message-ID: | 51265AB4.4080306@lignano.it |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi everybody!
I have a little problem with postgres 9.0 full text functionalities.
I have a document containing this string: "marko-jennifer/mary"
I have to match that document with words like "marko", "jennifer" or
"mary", but i can't find a way to do it.
Doing a dubug query i get:
select ts_lexize('public.dict', 'marko-jennifer/mary') ,
to_tsvector('public.generic', 'marko-jennifer')
return
ts_lexize to_tsvector
{marko-jennifer/mary} ''
I can't use language based stemming because names should not be be
stemmed)
How can i replace "-" and "/" with spaces and obtain (also other symbols
like dots, commas..):
select ts_lexize('public.dict', 'marko-jennifer/mary') ,
to_tsvector('public.generic', 'marko-jennifer/mary')
return
ts_lexize to_tsvector
{marko jennifer mary} {marko,jennifer,mary}
?
PS: i can't do things like select ts_lexize('public.dict',
translate('marko-jennifer/mary', '-', ' ')) ...
Thanks in advice
Asmir
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James B. Byrne | 2013-02-21 17:38:24 | Need help extripating plpgsql |
| Previous Message | François Beausoleil | 2013-02-21 16:52:35 | Determining last auto vacuum / analyze |