Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 79216 invoked from network); 21 Oct 2004 07:41:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Oct 2004 07:41:41 -0000 Received: (qmail 28426 invoked by uid 500); 21 Oct 2004 07:41:33 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 28351 invoked by uid 500); 21 Oct 2004 07:41:32 -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 28337 invoked by uid 99); 21 Oct 2004 07:41:32 -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 [203.199.26.74] (HELO daakghar.controlnet.co.in) (203.199.26.74) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 21 Oct 2004 00:41:31 -0700 Received: from karthik ([192.168.4.1]) by dakiya.controlnet.co.in (Netscape Messaging Server 4.15) with ESMTP id I5XBWI00.J9Q for ; Thu, 21 Oct 2004 13:08:42 +0530 From: "Karthik N S" To: "Lucene Users List" Subject: RE: Range Query Date: Thu, 21 Oct 2004 13:02:34 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Guys........ Apologies........ Please Correct me If I am wrong, with refrenc to http://issues.apache.org/eyebrowse/ReadMsg?listId=30&msgNo=7103 I will have to Re - Index all my 1 Million subindexes with the 'Price FieldType' padded of to standard no of '0' s. So can use the code modified while Searching to find the range of Query... [ Is there any other way to handle this Only during SearchProcesss... ] Please some more Advise.... :( Thx in advance. -----Original Message----- From: Chuck Williams [mailto:chuck@manawiz.com] Sent: Wednesday, October 20, 2004 8:06 PM To: Lucene Users List Subject: RE: Range Query Karthik, It is all spelled out in a Lucene HowTo here: http://wiki.apache.org/jakarta-lucene/SearchNumericalFields Have fun with it, Chuck > -----Original Message----- > From: Karthik N S [mailto:karthik@controlnet.co.in] > Sent: Wednesday, October 20, 2004 12:15 AM > To: Lucene Users List; Jonathan Hager > Subject: RE: Range Query > > Hi > > Jonathan > > > "When searching I also pad the query term" ??? > > When Exactly are u handling this [ using During Indexing Process > Also or > while Search on Process Only ] > > Can u be Please be specific............. > > [ if time permits and possible please can u send me the sample Code > for > the same ] > > . :) > > > Thx in advance > > > -----Original Message----- > From: Jonathan Hager [mailto:jhager@gmail.com] > Sent: Wednesday, October 20, 2004 3:31 AM > To: Lucene Users List > Subject: Re: Range Query > > > That is exactly right. It is searching the ASCII. To solve it I pad > my price using a method like this: > > /** > * Pads the Price so that all prices are the same number of characters > and > * can be compared lexigraphically. > * @param price > * @return > */ > public static String formatPriceAsString(Double price) { > if (price == null) { > return null; > } > return PRICE_FORMATTER.format(price.doubleValue()); > } > > where PRICE_FORMATTER contains enough digits for your largest number. > > private static final DecimalFormat PRICE_FORMATTER = new > DecimalFormat("0000000.00"); > > When searching I also pad the query term. I looked into hooking into > QueryParser, but since the lower/upper prices for my application are > different inputs, I choose to handle them without hooking into the > QueryParser. > > Jonathan > > > On Tue, 19 Oct 2004 12:35:06 +0530, Karthik N S > wrote: > > > > Hi > > > > Guys > > > > Apologies......... > > > > I have a Field Type "Text" 'ItemPrice' , Using it to Store " > Price > > Factor in numeric " such as 10, 25.25 , 50.00.... > > > > If I am suppose to Find the Range factor between 2 prices > > > > ex - > > Contents:shoes +ItemPrice:[10.00 TO 50.60] > > > > I get results other then the Range that has been executed [This > may > be > > due to query parsing the Ascii values instead of numeric values ] > > > > Am I am missing something in the Querry syntax or Is this the wrong > way > to > > construct the Query. > > > > Please Somebody Advise me.... ASAP..... :( > > > > Thx in advance > > > > WITH WARM REGARDS > > HAVE A NICE DAY > > [ N.S.KARTHIK] > > > > --------------------------------------------------------------------- > > 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 --------------------------------------------------------------------- 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