Full text and removing dashes from names - Mailing list pgsql-general

From Asmir Mustafic
Subject Full text and removing dashes from names
Date
Msg-id 51265AB4.4080306@lignano.it
Whole thread Raw
Responses Re: Full text and removing dashes from names  (Kevin Grittner <kgrittn@ymail.com>)
List 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

pgsql-general by date:

Previous
From: François Beausoleil
Date:
Subject: Determining last auto vacuum / analyze
Next
From: "James B. Byrne"
Date:
Subject: Need help extripating plpgsql