adding a custom tsearch parser

Поиск
Список
Период
Сортировка
От ara.t.howard
Тема adding a custom tsearch parser
Дата
Msg-id 2524b8cc0911051043s48fd93fcjc2f2b228fac09026@mail.gmail.com
обсуждение исходный текст
Ответы Re: adding a custom tsearch parser  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
i've been playing with the new built-in tsearch functionality and it's
really, really cool.

however, the default parser seems a overly complicated and
non-principle-of-least-surprise - at least to me.

for instance

filename.jpg

will not be found by a search for 'filename', since the default parser
considers 'filename.jpg' not only as one token, but as a hostname.

imho, the best default lexizer would simply scan for patterns of
alph-numerics.  in ruby

  tokens = content.scan( /\w+/ )

this makes for a very non surprising indexer since a search for 'ara'
after indexing 'ara.t.howard@gmail.com' would pull up that record.
currently it does not, since the entire token is consumed as an
'email' token.

my questions are

1) can the current parser be configured in any way?

2) if not, can someone provide and direction towards writing my own
and configuring pg to use it?

3) has any thought been given towards a more general purpose default
parser shipping with pg?  (few sites would consider 'versions' as
tokens except those run for us geeks)

kind regards.

--
-a
--
be kind whenever possible... it is always possible - h.h. the 14th dalai lama

В списке pgsql-general по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Adding a null
Следующее
От: Vick Khera
Дата:
Сообщение: Re: Bench marking performance or experience using Solid State Disk Drives (SSD) with postgres