[KinoSearch] Case sensitive and case insensitive on same index
Nathan Kurz
nate at verse.com
Wed Aug 6 12:51:02 PDT 2008
On Wed, Aug 6, 2008 at 2:33 AM, Riyaad Miller <riyaad.miller at predix.com> wrote:
> I'm looking to build a search option that allows the user to 'Match case'.
> I'm also trying to avoid building a separate index that preserves case
> sensitivity. Is there a work around for this or am I forced to have
> duplicate indexing (one case sensitive while the others case insensitive)?
I don't think there is any easy to do this. The way the
inverted-index works is that each 'word' has a distinct entry in the
index that lists the occurrences of that 'word'. Since you want to
have case-sensitive search, this means the entries for the words have
to be case-sensitive.
To enable case-insensitive search, you'd have to search through lots
of different entries in the index. There is no way to do this
automatically. You could, if you chose, create a custom query parser
that would treat all the case combinations as synonyms, expanding each
query into a lengthy Boolean.
It might be simplest just to have parallel indexes.
Nathan Kurz
nate at verse.com
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list