Hello,

I am indexing userAgent fields found in apache logs. Indexing and querying
everything with
KeywordAnalyzer - But I found something strange:


            IndexSearcher searcher = new IndexSearcher(reader);
            Analyzer q_analyzer = new KeywordAnalyzer();
            QueryParser parser = new QueryParser("userAgent", q_analyzer);

            System.out.println(queryStr);
            Query query = parser.parse(queryStr);
            System.out.println(query.toString());


When searched for userAgent:Moz* the above code will output:

Info:   userAgent:Mo*
Info:   userAgent:mo*

The keyword analyzer is clearly turning the query string into lower case.

Is there a way to avoid it? The index is case sensitive (it wont any
documents staring with mo*)
but the keyword analyzer turns everything into lower case.

Best Regards,
C.

Reply via email to