Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search using LUCENE

 
Sriram Akula
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using query parser. But the filed values on which we are searching is are being converted to lower case.

Is there any method to make it case sensitive?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That kind of thing is controlled by an Analyzer. If you don't specify one during indexing or searching, then a org.apache.lucene.analysis.standard.StandardAnalyzer will be used that applies a LowerCaseFilter, amongst other steps. If that's not what you want, then you need to supply your own Analyzer implementation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic