lexemes in prefix search going through dictionary modifications

From: Sushant Sinha <sushant354(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: lexemes in prefix search going through dictionary modifications
Date: 2011-10-25 15:26:18
Message-ID: 1319556378.2023.6.camel@dragflick
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I am currently using the prefix search feature in text search. I find
that the prefix characters are treated the same as a normal lexeme and
passed through stemming and stopword dictionaries. This seems like a bug
to me.

db=# select to_tsquery('english', 's:*');
NOTICE: text-search query contains only stop words or doesn't contain
lexemes, ignored
to_tsquery
------------

(1 row)

db=# select to_tsquery('simple', 's:*');
to_tsquery
------------
's':*
(1 row)

I also think that this is a mistake. It should only be highlighting "s".
db=# select ts_headline('sushant', to_tsquery('simple', 's:*'));
ts_headline
----------------
<b>sushant</b>

Thanks,
Sushant.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-10-25 16:05:46 Re: lexemes in prefix search going through dictionary modifications
Previous Message Gurjeet Singh 2011-10-25 13:54:08 Re: Unreproducible bug in snapshot import code