Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 23427 invoked from network); 13 Sep 2009 18:10:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Sep 2009 18:10:27 -0000 Received: (qmail 65697 invoked by uid 500); 13 Sep 2009 18:10:24 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 65612 invoked by uid 500); 13 Sep 2009 18:10:24 -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 65602 invoked by uid 99); 13 Sep 2009 18:10:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 18:10:24 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of markrmiller@gmail.com designates 209.85.221.192 as permitted sender) Received: from [209.85.221.192] (HELO mail-qy0-f192.google.com) (209.85.221.192) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 18:10:15 +0000 Received: by qyk30 with SMTP id 30so2122034qyk.5 for ; Sun, 13 Sep 2009 11:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=QwZxZGK3DZzW9gBRbUe3P+ehotPaW7IXLWyw84azxO8=; b=LwM13zPIRcVlC4QupoCU0uAvH3eTp7YQ+Q3xrZNgdDxJNfBUKr0S5sAiDWoq5jbUBz XxhdeHCGM5kbnRdw373VFiiUqBhY56S0Lv73awXdwz65jFug0pcTMRFVMFfQSrQgXq96 GkODPd5ITWhwIeYtzIQfb6m88I7VJqrEO/ZR4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=JnTB1afjLuaceEMd9wDHDGIDkB156Z+xiQdTvkOu8Qsu7frizyOmwaschmaBUpdvV9 gnDVDGq2PlUywFOOyVia0cZrYcfPRKJ16635ykYqTqYDcqn+5TNOXktI4Gt6pDuxnjWn 62qEac5KPm2tRtaM8z4GN6m2hfAcqI1zW669U= Received: by 10.224.36.139 with SMTP id t11mr4470461qad.350.1252865394162; Sun, 13 Sep 2009 11:09:54 -0700 (PDT) Received: from ?192.168.1.108? (ool-44c639d9.dyn.optonline.net [68.198.57.217]) by mx.google.com with ESMTPS id 8sm5308397qwj.28.2009.09.13.11.09.53 (version=SSLv3 cipher=RC4-MD5); Sun, 13 Sep 2009 11:09:53 -0700 (PDT) Message-ID: <4AAD3577.9040403@gmail.com> Date: Sun, 13 Sep 2009 14:09:59 -0400 From: Mark Miller User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: Enumerating NumericField using TermEnum? References: <9cafbc680909111500j156eafe3u2cfcd21b4f57ce37@mail.gmail.com> <9cafbc680909131020x4a6bd54fn47cffae41f95fc2f@mail.gmail.com> In-Reply-To: <9cafbc680909131020x4a6bd54fn47cffae41f95fc2f@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org >> NumericField uses a spezial encoding of terms for fast NumericRangeQueries. >> It indexes more than one term per value. How many terms depends on the >> precisionStep ctor parameter. If you set it to infinity (or something ge the >> bit size of your value, 32 for ints, it indexes exactly one value). These >> terms are used for very fast numeric queries. This extra overhead only has a >> positive impact for field with high cardinality (something > 500). For a >> simple hour field with 24 distinct values, the speed impact of >> NumericRangeQuery would be neglectible, it may even be a little bit slower >> because of additional overhead. I would suggest to use NumericField ony for >> real high-cardinality fields (like unix time stamps, prices, >> latitudes/longitudes (all types of float/doubles), day of year,...). >> >> Maybe I add this t the javadocs. >> +1 - intuition might be to use it for anything numeric. -- - Mark http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org