Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 79045 invoked from network); 25 Mar 2010 14:20:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Mar 2010 14:20:02 -0000 Received: (qmail 52379 invoked by uid 500); 25 Mar 2010 12:30:41 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 52346 invoked by uid 500); 25 Mar 2010 12:30:41 -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 52338 invoked by uid 99); 25 Mar 2010 12:30:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Mar 2010 12:30:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Mar 2010 12:30:34 +0000 Received: by bwz22 with SMTP id 22so6940435bwz.5 for ; Thu, 25 Mar 2010 05:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=tgD4Ris7C5pVowd9dZL+/vbHX+zU2UrIo/p6W+PrI3U=; b=yCXAQ0hf4Nc1KqgAIi2F6pD/Yrb+eins+KZwyMMVpKCgj4tMvwI8gKRm0FdJgMcn9j 0I0rsw3DjJIME3DGRuXL/aHlN6g3fv88o25qesTGJqncNr9Y+hkA7Eho37WHZBslVoAr 2n3YMtjHHlS6jCB9+EVCBZ3YPn/i2k7Gd6SWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=s9wjXvPxXcAvGZVBNioab6Dx23dY0Y4/TjDpxE4OFCjqKmpqaV3VRJOaqs/8vI5HG2 rGKGhbJM4QMF8KXJRUjnip75+SIsZu5b0Sg2mfmUHvkWdX3zZCUY/F5nAHRXQBaoEXes iHUqf4FeZdKbmucqbxqXj/UObwEIel5+M3GMQ= MIME-Version: 1.0 Received: by 10.204.156.5 with SMTP id u5mr5078704bkw.161.1269520214518; Thu, 25 Mar 2010 05:30:14 -0700 (PDT) In-Reply-To: References: <008d01cacc0e$bfe38d50$3faaa7f0$@de> <7182a8995b5b6d7023b633c662f55cf1.squirrel@www.mail.zapak.co.in> <8c4e68611003250514h3e475eb5k3e57b7ce836397b3@mail.gmail.com> From: Ian Lea Date: Thu, 25 Mar 2010 12:29:53 +0000 Message-ID: <8c4e68611003250529n20c2c2f4qb2c546a7d60338a@mail.gmail.com> Subject: Re: Range Queries Performance Hit To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org That question should be asked on the clucene list. This is the java-user lucene list. -- Ian. On Thu, Mar 25, 2010 at 12:19 PM, wrote: > > Hi, > > Is there something of this sort =A0provided in clucene as well..lucene fo= r > c++ ??? > > thanks, > Suman > >> No. =A0See java classes >> >> org.apache.lucene.search.NumericRangeQuery >> org.apache.lucene.document.NumericField >> >> See also recent thread on this list with subject "Lucene 3.0 Search >> Performance Stats". >> >> >> -- >> Ian. >> >> >> On Thu, Mar 25, 2010 at 11:53 AM, =A0 wrote: >>> >>> U mean I need to use padding technique in indexing and searching in >>> order >>> to make numeric searches rt? >>> >>> for numbers 1...10 >>> indexes should be =A001 02....10 >>> rather than 1 10 2.....9 >>> >>> >>> thanks, >>> Suman >>> >>> >>>> You should use NumericRangeQuery and NumericField (since 2.9). >>>> >>>> ----- >>>> Uwe Schindler >>>> H.-H.-Meier-Allee 63, D-28213 Bremen >>>> http://www.thetaphi.de >>>> eMail: uwe@thetaphi.de >>>> >>>> >>>>> -----Original Message----- >>>>> From: suman.holani@zapak.co.in [mailto:suman.holani@zapak.co.in] >>>>> Sent: Thursday, March 25, 2010 12:08 PM >>>>> To: java-user@lucene.apache.org >>>>> Subject: Range Queries Performance Hit >>>>> >>>>> Hello, >>>>> >>>>> >>>>> Range queries are lowering down the performance of search. >>>>> I am using date in my clucene application . >>>>> >>>>> lucene doc has these kind of fields: >>>>> >>>>> startdt=3D"1242758400" enddt=3D"1241980500" >>>>> >>>>> >>>>> >>>>> now when i am searching for >>>>> searchingdate =3D new RangeQuery(lastyear time in seconds,current tim= e >>>>> in >>>>> seconds, true); >>>>> >>>>> searchingdate1 =3D new RangeQuery(current time in seconds,nextyear ti= me >>>>> in >>>>> seconds, true); >>>>> >>>>> Query :i want all doc , created after last year and expired before >>>>> next >>>>> year. >>>>> >>>>> but the query is taking 15ms to run. >>>>> if i remove the query the execution time is reduced to half. >>>>> >>>>> 1. any other thing that i can use for range queries >>>>> 2. converting the time to minutes is also not helping me. >>>>> >>>>> Help me with the solution. >>>>> >>>>> >>>>> Thanks, >>>>> Suman >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>>>> For additional commands, e-mail: java-user-help@lucene.apache.org >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>>> For additional commands, e-mail: java-user-help@lucene.apache.org >>>> >>>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org