you should also make sure the data is indexed twice, once w/ the original case and once w/o. It's like putting a TokenFilter after WhitespaceTokenizer which returns two tokens - lowercased and the original, both in the same position (set posIncr to 0).
On Wed, Aug 12, 2009 at 6:20 AM, Max Lynch <ihas...@gmail.com> wrote: > I just want to see if it's safe to use two different analyzers for the > following situation: > > I have an index that I want to preserve case with so I can do > case-sensitive > searches with my WhitespaceAnalyzer. However, I also want to do case > insensitive searches. > > What I did was create a custom Analyzer that creates a LowerCaseFilter with > a WhitespaceTokenizer, and use that analyzer to search when I want case > insensitive searching, and use the default WhitespaceAnalyzer when I want > case sensitive. > > Is this the right approach, or should I change something? > > Thanks, > Max >