Search Postgresql Archives

Full text and removing dashes from names

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

 



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


--
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