Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 40145 invoked from network); 9 Mar 2004 19:39:44 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Mar 2004 19:39:44 -0000 Received: (qmail 15144 invoked by uid 500); 9 Mar 2004 19:39:28 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 15112 invoked by uid 500); 9 Mar 2004 19:39:27 -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 15098 invoked from network); 9 Mar 2004 19:39:27 -0000 Received: from unknown (HELO sonny.siteprotect.com) (64.26.0.85) by daedalus.apache.org with SMTP; 9 Mar 2004 19:39:27 -0000 Received: from petmystone.com ([4.21.127.43]) by sonny.siteprotect.com (8.11.6/8.11.6) with ESMTP id i29JdWp18010 for ; Tue, 9 Mar 2004 13:39:32 -0600 Message-ID: <404E1D74.1020206@petmystone.com> Date: Tue, 09 Mar 2004 14:39:32 -0500 From: Timothy Stone Reply-To: citylists@petmystone.com Organization: City of Harrisburg, PA User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Users List Subject: Re: Storing numbers References: <200403051215.40713.lucene@nitwit.de> In-Reply-To: <200403051215.40713.lucene@nitwit.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 lucene@nitwit.de wrote: > Hi! > > I want to store numbers (id) in my index: > > long id = 1069421083284; > doc.add(Field.UnStored("in", String.valueOf(id))); > > But searching for "id:1069421083284" doesn't return any hits. > > Well, did I misunderstand something? UnStored is the number is stored but not > index (analyzed), isn't it? Anyway, Field.Text doesn't work either. > > TIA > Timo Craig Walls wrote an excellent article in JDJ at the end of 2002 regarding Lucene (not shown in any of the resources BTW). He documents using Lucene along side a database as well as provides two classes (and others unrelated) that extend the functionality of the StopAnalyzer to include numbers and or alpha numerics. Check out the article at: http://www.sys-con.com/story/print.cfm?storyid=37296 HTH, Tim --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org