lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikhil Goel <>
Subject TermQuery And PhraseQuery Case Sensitive Values
Date Sat, 14 May 2005 20:17:59 GMT
While indexing my documents I add a Keyword "initiatorFN" to each
document. I have a search page which uses QueryParser, so when I try
to give some query such as initiatorFN:Nikhil, and i see what query is
being passed it seems the value is changed to lowercase(i.e.
querystring becomes initiatorFN:nikhill) and hence i dont get any
result back whereas if I use TokenQuery it works well(i.e queryString
remainsinitiatorFN:Nikhil) .

This is the code I am using for search:-

IndexSearcher searcher = new IndexSearcher("directory");
Analyzer analyzer = new StandardAnalyzer();
Query query = QueryParser.parse(queryString, "contents", analyzer);
Hits hits =;
System.out.println("Query::-" + query.toString());

I want to handle everything generically and hence I am using
QueryParser. Can someone please tell me how to disable this behavior
of QueryParser so that it doesnt make the value lowercase.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message