Yeah, since I will need to toggle selectively, it may not work. Also as for writing customized query subclasses, only way I can think of is to create several queries with all possible upper/lower case combinations of the main query, which may really degrade the performance. Creating two different indexes means more overhead for maintaining the index with new docs coming in. Creating two separate fields sounds to be the better option.
> > On Aug 22, 2005, at 11:10 AM, Rajesh Munavalli wrote: >> You could also treat the case-sensitive and case-insensitive as >> Synonyms >> and index them at the same position. This would be helpful in phrase >> queries. > > You wouldn't be able to selectively toggle between case-sensitive and > -insensitive searching this way, though, so I'm not sure if there is > merit in doing both cases in the same position or not. > > Erik > > >> >> Rajesh Munavalli >> >> >>> -----Original Message----- >>> From: Erik Hatcher [mailto:[EMAIL PROTECTED] >>> Sent: Monday, August 22, 2005 10:04 AM >>> To: java-user@lucene.apache.org >>> Subject: Re: Case-sensitive search >>> >>> >>> On Aug 22, 2005, at 10:40 AM, [EMAIL PROTECTED] wrote: >>> >>>> Is there any way to index as case-sensitive and then, while >>>> >>> searching, >>> >>>> making the search case-sensitive and case-insensitive using >>>> >>> the same >>> >>>> index as needed? >>>> >>> >>> Not really. Terms in the index are ordered >>> lexicographically, including case. It certainly would be >>> possible to write customized Query subclasses to do this sort >>> of thing at the expense of performance. >>> >>> The only techniques I'm aware of are to either build separate >>> indexes or index the same information into separate fields of >>> the same documents using different analyzers per field. >>> >>> Erik >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]