changing text search treatment of puncutation

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Postgresql General List <pgsql-general(at)postgresql(dot)org>
Subject: changing text search treatment of puncutation
Date: 2008-07-02 18:56:04
Message-ID: 48446333-3ACA-4AAB-8ACB-AEBE17D767E3@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Text with the '/' character gets treated as a file path, e.g.

select * from to_tsvector('english', 'home/work');

gives only the single token:

'home/work':1

Changing '/' to '-' gives

'home':2 'work':3 'home-work':1

which is much more desirable for this application.

Is there an easy way to change '/' to be treated like '-' ? I've
looked over the documentation several times and could not find
anything. Even just a way to get the two tokens 'home' and 'work'
without the joined form would be helpful.

Thanks,

John DeSoi, Ph.D.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gwyneth Morrison 2008-07-02 19:12:59 Re: Delete from Join
Previous Message Tom Lane 2008-07-02 18:23:37 Re: Memory use in 8.3 plpgsql with heavy use of xpath()