Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 92579 invoked from network); 18 Aug 2005 22:16:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Aug 2005 22:16:30 -0000 Received: (qmail 59519 invoked by uid 500); 18 Aug 2005 22:16:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 59294 invoked by uid 500); 18 Aug 2005 22:16:24 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 59281 invoked by uid 99); 18 Aug 2005 22:16:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2005 15:16:24 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.117.150.145] (HELO mail.controldocs.com) (65.117.150.145) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2005 15:16:43 -0700 Received: from webmail.controldocs.com (localhost [127.0.0.1]) by mail.controldocs.com (8.12.11/8.12.11) with ESMTP id j7IMGLiZ023717 for ; Thu, 18 Aug 2005 17:16:21 -0500 Received: from 65.117.150.250 (SquirrelMail authenticated user tareque); by webmail.controldocs.com with HTTP; Thu, 18 Aug 2005 17:16:21 -0500 (CDT) Message-ID: <34271.65.117.150.250.1124403381.squirrel@65.117.150.250> In-Reply-To: <934C8604-7089-41DD-B07C-E6D29552F02D@ehatchersolutions.com> References: <33552.65.117.150.250.1124394618.squirrel@65.117.150.250> <20050818195258.99994.qmail@web31109.mail.mud.yahoo.com> <33647.65.117.150.250.1124396164.squirrel@65.117.150.250> <934C8604-7089-41DD-B07C-E6D29552F02D@ehatchersolutions.com> Date: Thu, 18 Aug 2005 17:16:21 -0500 (CDT) Subject: Re: Case-sensitive search From: tareque@controldocs.com To: java-user@lucene.apache.org User-Agent: SquirrelMail/1.4.3-RC1 X-Mailer: SquirrelMail/1.4.3-RC1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Scanned-By: MIMEDefang 2.42 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks again! The analyzer is working now. But seems like actually the QueryParser I am using is probably converting the queries to lowercase first. Is there any way to stop that? Here is the line of code where I am parsing: Query query = QueryParser.parse(line, "contents", analyzer); As for analyzer, I have tried both StardaAnalyzer and StopAnalyzer. > On Aug 18, 2005, at 4:16 PM, tareque@controldocs.com wrote: >> Thanks! I have used StopAnalyzer to index. Does it lower-case before >> indexing? I don't touch the query string before sending for >> searching, so >> the query string is not lower-cases. > > Pretty much all built-in Lucene analyzers lower-case: > > http://svn.apache.org/repos/asf/lucene/java/trunk/src/java/org/ > apache/lucene/analysis/StopAnalyzer.java > (scroll to the bottom to see the tokenStream method - the heart of an > analyzer) > > The exception is the WhitespaceAnalyzer, which is probably not what > you want to use. You can write your own Analyzer (copy/paste one and > remove the lowercasing filter - though some analyzers use a > lowercasing tokenizer, not a filter). > > Erik > > > >> >> >>> The search really is case sensitive, it's just that all input is >>> usually lower-cased, so it feels like it's case insensitive. In >>> other >>> words, don't lower-case your input before indexing, and don't >>> lower-case your queries (i.e. pick an Analyzer that doesn't >>> lower-case). >>> >>> Otis >>> >>> >>> --- tareque@controldocs.com wrote: >>> >>> >>>> Is there any way to do a case-sensitive search? >>>> >>>> Thanks >>>> Tareque >>>> ControlDOCS >>>> >>>> >>>> -------------------------------------------------------------------- >>>> - >>>> 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 >>> >>> >> >> >> >> --------------------------------------------------------------------- >> 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org