Skip site navigation (1) Skip section navigation (2)

full-text search question

From: Sabbiolina <sabbiolina(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: full-text search question
Date: 2008-06-18 12:49:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I've seen that the default parser for the full-text search can identify
e-mail addresses, hosts, URLs… but I have a serious problem with it:

Suppose I index the following sentence "the search engine I use the most is"

And I search "google" no result is found.

Instead if I search "" the record is found correctly.

I guess the reason is because the parser treats as a single
token (of type 'host') but as everyone can easily see the result of this is
a major problem. In fact the word "google" actually is in the above
sentence, and the end-user of the database obviously asks me "why does your
FTS not find that record when I can clearly see that my search term is

Reading the docs I've seen that the parser can produce multiple tokens for
the same word (for example the word "make-up" produces 4 tokens: make-up,
make, -, up)… why not doing the same with URLs and e-mails? Why is only treated as a unique word? Why not producing multiple
tokens like, www, ., google, ., com? (obviously www and . can
be nulled or stopworded).

Does anybody know of a better parser for Postgres? Or at least a trick to
make its FTS find the record above by searching only a part of the URL?


pgsql-admin by date

Next:From: Oleg BartunovDate: 2008-06-18 13:19:24
Subject: Re: full-text search question
Previous:From: wolfgang.grafDate: 2008-06-18 10:28:38
Subject: Move completly

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group