lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Nielsen <and...@visator.com>
Subject RE: Case Sensitive and Insensitive Searches BOTH needed
Date Thu, 20 Jun 2002 13:06:09 GMT
1) Modify StandardAnalyzer to remove the LowerCaseFilter

2) Make 2 fields in your index, one with the text in the original format and
one with all lower-case format. 

3) a) If the checkbox calls for case-insensitive search, make the search
string lower-case and search the field containing the text with lower-case
text. 

   b) If the checkbox calls for case-sensitive search, search the field with
the original text without modifying the search string.


regards,
Anders Nielsen

-----Original Message-----
From: AJIT RAJWADE [mailto:ajit.rajwade@veritas.com]
Sent: 20. juni 2002 14:46
To: lucene-user@jakarta.apache.org
Subject: Case Sensitive and Insensitive Searches BOTH needed


Hello,

An application I am building requires me to perform both case sensitive as
well as case insensitive searches on the fly. I mean while searching for a
particular word/phrase in my application, the user has the option to have
the results sensitive or in-sensitive to case, depending upon the state of a
checkbox. What can I do to get around this problem?

If I use StandardAnalyzer, it uses the LowerCaseFilter...so the results are
all case-insensitive. If I modify the StandardAnalyzer code to remove the
LowerCaseFilter, I get all case sensitive results! What should I do? 

Thanks,
Ajit

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message