You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Raghavendra Prabhu <rr...@gmail.com> on 2006/03/15 07:37:25 UTC
lucene query analysis
Hi
The problem which i am facing is that the query is Case Sensitive
If i type in BIG letters i am not able to see answers and if i type in
small letters i am able to see results
Is there anything by which i can do a case conversion
Now i am using a WhiteSpaceAnalyser . What Analyser should change it to ?
Rgds
Prabhu
Re: lucene query analysis
Posted by Nadav Har'El <NY...@il.ibm.com>.
"Raghavendra Prabhu" <rr...@gmail.com> wrote on 15/03/2006 08:37:25 AM:
> Hi
>
> The problem which i am facing is that the query is Case Sensitive
>
> If i type in BIG letters i am not able to see answers and if i type in
> small letters i am able to see results
>
> Is there anything by which i can do a case conversion
>
> Now i am using a WhiteSpaceAnalyser . What Analyser should change it to ?
Indeed, WhiteSpaceAnalyzer only breaks up the text on white space, doing
nothing about the case. You should probably StandardAnalyzer which in
addition to breaking up the text on white spaces, also breaks it up in
other logical places (like punctuation, but not in every case), and
more importantly for you, it indexes the text in lowercase.
You should use StandardAnalyzer both during indexing, and during query,
for this to work.
--
Nadav Har'El.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org