Re: lexemes in prefix search going through dictionary modifications - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lexemes in prefix search going through dictionary modifications
Date
Msg-id 3361.1320795559@sss.pgh.pa.us
Whole thread Raw
In response to Re: lexemes in prefix search going through dictionary modifications  (Sushant Sinha <sushant354@gmail.com>)
List pgsql-hackers
Sushant Sinha <sushant354@gmail.com> writes:
> I think there is a need to provide prefix search to bypass
> dictionaries.If you folks think that there is some credibility to such a
> need then I can think about implementing it. How about an operator like
> ":#" that does this? The ":*" will continue to mean the same as
> currently.

I don't think that just turning off dictionaries for prefix searches is
going to do much of anything useful, because the lexemes in the index
are still going to have gone through normalization.  Somehow we need to
identify which lexemes could match the prefix after accounting for the
fact that they've been through normalization.

An example: if the original word is "transferring", the lexeme (in the
english config) is just "transfer".  If you search for "transferring:*"
and suppress dictionaries, you'll fail to get a match, which is simply
wrong.  It's not a step forward to suppress some failure cases while
adding new ones.

Another point is that whatever we do about this really ought to be
inside the engine, not exposed in a form that makes users do their
queries differently.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 9.1.2 ?
Next
From: Andrew Dunstan
Date:
Subject: Re: Materialized views