Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 6887 invoked from network); 14 Jan 2004 15:58:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Jan 2004 15:58:53 -0000 Received: (qmail 93090 invoked by uid 500); 14 Jan 2004 15:58:42 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 93068 invoked by uid 500); 14 Jan 2004 15:58:42 -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 93055 invoked from network); 14 Jan 2004 15:58:41 -0000 Received: from unknown (HELO sccrmhc12.comcast.net) (204.127.202.56) by daedalus.apache.org with SMTP; 14 Jan 2004 15:58:41 -0000 Received: from katesrlaptop (unknown[199.44.167.250]) by comcast.net (sccrmhc12) with SMTP id <20040114155843012006f0jde> (Authid: patrickk79); Wed, 14 Jan 2004 15:58:43 +0000 Message-ID: <000f01c3dab7$980faba0$8a65a8c0@katesrlaptop> From: "Patrick Kates" To: "Lucene Users List" References: <000501c3da2b$a6001ce0$8a65a8c0@katesrlaptop> <1FCFCE56-4626-11D8-81F4-000393A564E6@ehatchersolutions.com> Subject: Re: StandardAnalyzer and numbers indexed as text Date: Wed, 14 Jan 2004 11:00:54 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for the responses everyone. They helped lead me to my real problem. Which I suspect is the typical uber newb mistake. I was indexing with SimpleAnalyzer and searching with StandardAnalyzer. So we are now indexing AND searching with StandardAnalyzer and things are working beautifully. Thanks again, pdk ----- Original Message ----- From: "Erik Hatcher" To: "Lucene Users List" Sent: Tuesday, January 13, 2004 7:10 PM Subject: Re: StandardAnalyzer and numbers indexed as text > On Jan 13, 2004, at 6:19 PM, Patrick Kates wrote: > > I have a text field called ACTIVE_YEAR that stores (of course) a year > > like > > 2003. When I index this field I can see the number in my index (using > > Luke) > > but I can't search it. If I add a text character to the end of the > > field > > and index it (200x) I can then search and find 'x', but not any > > portion of > > the number. > > Is it possible you're using a Keyword field for indexing, but an > analyzer at query time that is ripping off the number? Try the latest > Luke (0.4) and you'll see the query expression that it got parsed to on > the Search tab. The results may tell the tale. > > > One finally piece of info, when using Luke to view the terms contained > > in > > the index I can find my 'x' term, but none of the years are listed as > > terms. > > > > Any ideas on how to fix this? > > Be careful how you index and query. Field.Keyword sounds like what you > want for indexing. But for querying, QueryParser has some nasty habits > of analyzing everything. Do some Query.toString debugging if you are > using QueryParser - therein likely lies the clues to the problem. > > Erik > > > --------------------------------------------------------------------- > 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