Re: Add Space symbols for TSvector

From: Arjen Nienhuis <a(dot)g(dot)nienhuis(at)gmail(dot)com>
To: Henk van Lingen <H(dot)G(dot)K(dot)vanLingen(at)uu(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Add Space symbols for TSvector
Date: 2009-06-25 21:18:55
Message-ID: 11ddbd200906251418i3d810e0fnf1ee1c5fa183fb58@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > preprocess text, for example, using replace(), regexp_replace() functions
>
> Oke, you mean at the time the insert in de db is done, i suppose.
> However, I'm using the new syslog-ng 3 feature which does the
> insert directly. So I have to change the syslogd for that.
>
> I understand the ts_search parser is not configurable?
>
>
you can make function f(s) -> replace(replace(s, foo, bar), baz, bar)

and then search and index on f(s)

CREATE INDEX ... ON table ((f(s)));
SELECT s FROM table WHERE f(s) "matches?" '127.0.0.1';

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Spotts 2009-06-26 00:00:25 Re: planned recovery from a certain transaction
Previous Message Greg Stark 2009-06-25 20:59:25 Re: planned recovery from a certain transaction