tsearch2 anomoly?

From: RC Gobeille <bob(dot)gobeille(at)hp(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: oleg(at)sai(dot)msu(dot)su, teodor(at)sigaev(dot)ru
Subject: tsearch2 anomoly?
Date: 2007-09-06 15:06:28
Message-ID: ABE0EC6D-D594-4453-9AD1-003A8B1296B8@hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm having trouble understanding to_tsvector. (PostreSQL 8.1.9 contrib)

In this first case converting 'gallery2-httpd-conf' makes sense to me
and is exactly what I want. It looks like the entire string is
indexed plus the substrings broken by '-' are indexed.

ossdb=# select to_tsvector('gallery2-httpd-conf');
to_tsvector
---------------------------------------------------------
'conf':4 'httpd':3 'gallery2':2 'gallery2-httpd-conf':1

However, I'd expect the same to happen in the httpd example - but it
does not appear to.

ossdb=# select to_tsvector('httpd-2.2.3-5.src.rpm');
to_tsvector
---------------------------
'httpd-2.2.3-5.src.rpm':1

Why don't I get: 'httpd', 'src', 'rpm', 'httpd-2.2.3-5.src.rpm' ?

Is this a bug or design?

Thank you!
Bob

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Pailleau 2007-09-06 15:22:33 archive_command with an environnement variable ?
Previous Message Tom Lane 2007-09-06 14:46:58 Re: Wrong dynamic link ../../../src/interfaces/libpq/libpq.sl.3