Re: [GENERAL] Question regarding custom parser

2010-10-05 Thread Arjen Nienhuis
You can create an index on to_tsvector(replace(foo, '-', ' ')) and then search using ...match..(replace(foo, ...), ...) On Mon, Oct 4, 2010 at 11:41 AM, Arthur van der Wal < arthurvander...@gmail.com> wrote: > Hi, > > I want to change the way PostgreSQL splits text into tokens, for example: > > p

[GENERAL] Question regarding custom parser

2010-10-04 Thread Arthur van der Wal
Hi, I want to change the way PostgreSQL splits text into tokens, for example: plainto_tsquery("v-74") should split it up as "v" & "74" instead of "v" & "-74". Another example: select to_tsvector('NL83-V-74-001-001')'-001':5,6 '74':4 'nl83':2 'nl83-v':1 'v':3 Searching for 'v-71' does not fin

[GENERAL] Question regarding custom parser

2010-10-04 Thread Arthur van der Wal
Hi, I want to change the way PostgreSQL splits text into tokens, for example: plainto_tsquery("v-74") should split it up as "v" & "74" instead of "v" & "-74". Another example: select to_tsvector('NL83-V-74-001-001')'-001':5,6 '74':4 'nl83':2 'nl83-v':1 'v':3 Searching for 'v-71' does not find