Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 46850 invoked from network); 1 Nov 2005 15:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Nov 2005 15:19:45 -0000 Received: (qmail 4297 invoked by uid 500); 1 Nov 2005 15:19:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 4273 invoked by uid 500); 1 Nov 2005 15:19:39 -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 4262 invoked by uid 99); 1 Nov 2005 15:19:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 07:19:38 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 205.152.59.70 is neither permitted nor denied by domain of rwatkins@foo-bar.org) Received: from [205.152.59.70] (HELO imf22aec.mail.bellsouth.net) (205.152.59.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 07:19:34 -0800 Received: from ibm65aec.bellsouth.net ([68.209.119.157]) by imf22aec.mail.bellsouth.net with ESMTP id <20051101151646.NZVJ19457.imf22aec.mail.bellsouth.net@ibm65aec.bellsouth.net> for ; Tue, 1 Nov 2005 10:16:46 -0500 Received: from jimwormold ([68.209.119.157]) by ibm65aec.bellsouth.net with ESMTP id <20051101151645.VNCI28071.ibm65aec.bellsouth.net@jimwormold> for ; Tue, 1 Nov 2005 10:16:45 -0500 Date: Tue, 1 Nov 2005 10:16:16 -0500 (EST) From: Robert Watkins To: java-user@lucene.apache.org Subject: Re: Search problems In-Reply-To: <1130853367.22840.72.camel@localhost.localdomain> Message-ID: References: <1130853367.22840.72.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N One approach for matching your queries with Luke would be to write a custom Analyzer that does absolutely nothing to the terms. Then, if you put this Analyzer in your classpath when running Luke you can select it as the Analyzer you want Luke to use to tokenize your query. This is not, of course, the approach you would want to take in your application, but at least it will allow you to use Luke as you have specified. -- Robert Watkins On Tue, 1 Nov 2005, Miles Barr wrote: > On Thu, 2005-10-27 at 16:35 -0400, Sharma, Siddharth wrote: >> My index has 4 keyword fields and one unindexed field. >> I want to search by the 4 keyword fields and return the one unindexed field. >> >> I can iterate over the documents via Luke. >> But when I search for the same values that I see via Luke, it does not find >> the document. >> >> [ snipped ] >> >> What could the problem be? Any ideas? >> I have added all the 4 fields with 'Field.Keyword'. > > Field.Keyword requires an exact match, i.e. you should manually create a > TermQuery. Luke will analyze your query and hence tokenise it. Almost > certainly the tokens it creates won't match the values in your field, > because they have to be an exact match. > > [ snipped ] --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org