nate at verse
Aug 6, 2008, 12:51 PM
Post #2 of 2
On Wed, Aug 6, 2008 at 2:33 AM, Riyaad Miller <riyaad.miller [at] predix> wrote:
Re: Case sensitive and case insensitive on same index
[In reply to]
> 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.
nate [at] verse
KinoSearch mailing list
KinoSearch [at] rectangular