Re: Creating a custom email token parser for FTS

From: VM Brasseur <vmb(at)vmbrasseur(dot)com>
To: sfpug(at)postgresql(dot)org
Subject: Re: Creating a custom email token parser for FTS
Date: 2014-01-16 00:49:09
Message-ID: 52D72C85.4010505@vmbrasseur.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

On 01/15/2014, 16:40 , Brian Ghidinelli wrote:
>> JB: Also consider that email addresses can be MUCH more complex than the
>> JB: above.
>
> Thanks - that's a bummer. I know emails can be more complex, but the
> fact remains that I want to partially search them. I haven't tried
> dropping the email token from a particular config to see what would
> happen. I also came across another technique last night where someone
> suggested splitting it up before indexing so it would be parsed
> differently and that might work for me.

Which language are you using to parse the address? Most languages will
have a library which which parse & test validity according to RFC*822.
It's much easier (and probably more advisable) to use one of those than
to roll your own via regex or similar. Using one of these libraries
could cut many hours off your development time.

For more information on valid email address formatting:
http://tools.ietf.org/html/rfc2822

In response to

Browse sfpug by date

  From Date Subject
Next Message Sergey Konoplev 2014-01-16 21:29:52 Re: The uselessness of pgbouncer PAUSE
Previous Message Brian Ghidinelli 2014-01-16 00:40:15 Re: Creating a custom email token parser for FTS