Search Postgresql Archives

adding a custom tsearch parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx' 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux