lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikhil Goel <nikhil.g...@gmail.com>
Subject TermQuery And PhraseQuery Case Sensitive Values
Date Sat, 14 May 2005 20:17:59 GMT
Hi, 
   
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 = searcher.search(query);
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.

thanks.
Nikhil

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message