Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 55656 invoked from network); 20 Jun 2002 15:51:52 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 20 Jun 2002 15:51:52 -0000 Received: (qmail 29840 invoked by uid 97); 20 Jun 2002 15:51:44 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 29638 invoked by uid 97); 20 Jun 2002 15:51:43 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 27775 invoked by uid 98); 20 Jun 2002 13:06:19 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: From: Anders Nielsen To: 'Lucene Users List' Subject: RE: Case Sensitive and Insensitive Searches BOTH needed Date: Thu, 20 Jun 2002 15:06:09 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: