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 li hao cho <ch...@gmail.com> on 2007/07/20 08:52:19 UTC

Question regarding ignore case?

Hi all, my lucene index is prepared for search, but I forgot to change
all the english word to lower case. When I search, I have to type the
same case as in lucene index. I found that QueryFilter may solve the
problem, but it seems that it's used for filter query, not the lucene
index. How do I ignore the case in lucene index?

--
Li-Hao Cho
cholihao@gmail.com
Department of Computer Science
National Cheng Chi University, Taipei, Taiwan, R.O.C."

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


RE: Question regarding ignore case?

Posted by "Chhabra, Kapil" <kc...@akamai.com>.
I don't think that there is any other way out apart from re-indexing in
all-small or all-caps case(through an Analyzer or externally), and then
searching in the same case as you used while indexing.
Even if you find a way by which you can run case insensitive searches, I
am sure it'll add to the complexity at the search time.
QueryFilter is used to filter down the search results and I doubt if
it'll solve your problem.

Regards,
kapilChhabra

-----Original Message-----
From: li hao cho [mailto:cholihao@gmail.com] 
Sent: Friday, July 20, 2007 12:22 PM
To: java-user@lucene.apache.org
Subject: Question regarding ignore case?

Hi all, my lucene index is prepared for search, but I forgot to change
all the english word to lower case. When I search, I have to type the
same case as in lucene index. I found that QueryFilter may solve the
problem, but it seems that it's used for filter query, not the lucene
index. How do I ignore the case in lucene index?

--
Li-Hao Cho
cholihao@gmail.com
Department of Computer Science
National Cheng Chi University, Taipei, Taiwan, R.O.C."

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


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


RE: Question regarding ignore case?

Posted by Li...@emc.com.
When index, you can add LowerCaseFilter to your analyzer, or just use
some analyzer already done lowercase, such as
StandardAnalyzer,SimpleAnalyzer

Andy

-----Original Message-----
From: jeogoodjob@gmail.com [mailto:jeogoodjob@gmail.com] On Behalf Of li
hao cho
Sent: Friday, July 20, 2007 2:52 PM
To: java-user@lucene.apache.org
Subject: Question regarding ignore case?

Hi all, my lucene index is prepared for search, but I forgot to change
all the english word to lower case. When I search, I have to type the
same case as in lucene index. I found that QueryFilter may solve the
problem, but it seems that it's used for filter query, not the lucene
index. How do I ignore the case in lucene index?

--
Li-Hao Cho
cholihao@gmail.com
Department of Computer Science
National Cheng Chi University, Taipei, Taiwan, R.O.C."

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



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