Return-Path: Delivered-To: apmail-lucene-java-commits-archive@www.apache.org Received: (qmail 63728 invoked from network); 26 Feb 2008 22:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 22:26:32 -0000 Received: (qmail 4273 invoked by uid 500); 26 Feb 2008 22:26:27 -0000 Delivered-To: apmail-lucene-java-commits-archive@lucene.apache.org Received: (qmail 4254 invoked by uid 500); 26 Feb 2008 22:26:27 -0000 Mailing-List: contact java-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-commits@lucene.apache.org Received: (qmail 4243 invoked by uid 99); 26 Feb 2008 22:26:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 14:26:27 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 22:26:02 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 7C51CD2E4 for ; Tue, 26 Feb 2008 22:26:11 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: java-commits@lucene.apache.org Date: Tue, 26 Feb 2008 22:26:11 -0000 Message-ID: <20080226222611.11504.91056@eos.apache.org> Subject: [Lucene-java Wiki] Update of "DateRangeQueries" by PaulElschot X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification. The following page has been changed by PaulElschot: http://wiki.apache.org/lucene-java/DateRangeQueries The comment on the change is: Add using indexed hierarchical prefixes, and splitting off extra terms. ------------------------------------------------------------------------------ http://nagoya.apache.org/eyebrowse/BrowseList?listName=lucene-user@jakarta.apache.org&by=thread&from=943115 + == Using indexed hierarchical prefixes == + + When the above advice does not help enough, consider indexing a date CCYYMMDD as multiple prefixes on the same index positions: + + C CC CCY CCYY CCYYMM CCYYMMD CCYYMMDD + + and use the shortest prefixes possible to search for a range. A similar scheme can be used for general numerical range searching. This trades off index size for search performance. + + When longer dates or numbers need to be indexed, for example CCYYMMDDmmss with minutes and seconds added, consider indexing the mmss separately, possibly with hierarchical prefixes themselves. + A search with CCYYMMDDmmss accuracy would then need a BooleanQuery with required clauses for the CCYYMMDD and mmss parts. +