Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 47893 invoked from network); 8 Feb 2005 14:46:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 14:46:05 -0000 Received: (qmail 85208 invoked by uid 500); 8 Feb 2005 14:45:59 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 85185 invoked by uid 500); 8 Feb 2005 14:45:59 -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 85171 invoked by uid 99); 8 Feb 2005 14:45:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 08 Feb 2005 06:45:58 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id BFAB313E200A; Tue, 8 Feb 2005 09:45:55 -0500 (EST) Received: from [128.143.167.124] (d-128-167-124.bootp.Virginia.EDU [128.143.167.124]) by ehatchersolutions.com (Postfix) with ESMTP id 1A97013E2006 for ; Tue, 8 Feb 2005 09:45:41 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Problem searching Field.Keyword field Date: Tue, 8 Feb 2005 09:45:41 -0500 To: "Lucene Users List" X-Mailer: Apple Mail (2.619.2) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The problem is that QueryParser analyzes all pieces of a query expression regardless of whether you indexed them as a Field.Keyword or not. If you need to use QueryParser and still support keyword fields, you'll want to plug in an analyzer specific to that field using PerFieldAnalyzerWrapper. You'll see this demonstrated in the "Lucene in Action" source code. Here's a quick pointer to where we cover it in the book: http://www.lucenebook.com/search?query=KeywordAnalyzer On Feb 8, 2005, at 9:26 AM, Mike Miller wrote: > Thanks for the quick response. > > Sorry for my lack of understanding, but I am learning! Won't the query > parser still handle this query? My limited understanding was that the > search call provides the 'all' field as default field for query terms > in > the case where fields aren't specified. Using the current code, > searches like author:Mike" and title:Lucene work fine. > > -----Original Message----- > From: Miles Barr [mailto:miles@runtime-collective.com] > Sent: Tuesday, February 08, 2005 8:08 AM > To: Lucene Users List > Subject: Re: Problem searching Field.Keyword field > > You're using the query parser with the standard analyser. You should > construct a term query manually instead. > > > -- > Miles Barr Runtime Collective Ltd. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org