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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to