>> >> On Aug 18, 2005, at 6:22 PM, [EMAIL PROTECTED] wrote: >> >>>> On Thu, 2005-08-18 at 17:16, [EMAIL PROTECTED] wrote: >>>> >>>>> Thanks again! The analyzer is working now. But seems like >>>>> actually the >>>>> QueryParser I am using is probably converting the queries to >>>>> lowercase >>>>> first. Is there any way to stop that? Here is the line of code >>>>> where I >>>>> am >>>>> parsing: >>>>> >>>>> Query query = QueryParser.parse(line, "contents", analyzer); >>>>> >>>>> As for analyzer, I have tried both StardaAnalyzer and StopAnalyzer. >>>>> >>>> >>>> You need to use the same analyzer for parsing queries as you do for >>>> indexing content. >>>> >>>> Luke Francl >>>> >>>> >>> >>> Actually I have used StopAn for indexing. So used the same for parsing >>> queries, but it's still converting the queries to lowercase before >>> running >>> the actually search >> >> Both of those analyzers lowercase. When you said it was working, >> what did you mean? To prevent lowercasing and get stop words >> removed you *will* have to write a custom analyzer. Also keep in >> mind that StopFilter is case-sensitive and that the stop word list is >> all lowercase - so you will need to account for this with a custom >> stop filter probably too. >> >> It is highly recommended to "analyze the analyzer" - a topic covered >> in depth in the Analysis chapter in Lucene in Action, and one of my >> java.net articles. >> >> Erik >> > > It's all working now. I did write a custom analyzer using the > StopAnalyzer, which correctly indexed. The problem was, when I was parsing > the query I forgot to use my new analyzer and was using the old > StopAnalyzer instead. Thanks for all the help! > > Tareque >
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? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]