Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 89083 invoked from network); 24 Nov 2003 04:40:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Nov 2003 04:40:28 -0000 Received: (qmail 11627 invoked by uid 500); 24 Nov 2003 04:40:04 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 11593 invoked by uid 500); 24 Nov 2003 04:40:04 -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 11578 invoked from network); 24 Nov 2003 04:40:04 -0000 Received: from unknown (HELO c000.snv.cp.net) (209.228.32.66) by daedalus.apache.org with SMTP; 24 Nov 2003 04:40:04 -0000 Received: (cpmta 9554 invoked from network); 23 Nov 2003 20:40:13 -0800 Received: from 24.51.109.181 (HELO ehatchersolutions.com) by smtp.hatcher.net (209.228.32.66) with SMTP; 23 Nov 2003 20:40:13 -0800 X-Sent: 24 Nov 2003 04:40:13 GMT Date: Sun, 23 Nov 2003 20:40:43 -0800 Subject: Re: Dates and others Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Erik Hatcher To: "Lucene Users List" Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <5D01F5F2-1E38-11D8-938B-000393A564E6@ehatchersolutions.com> X-Mailer: Apple Mail (2.552) 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 On Sunday, November 23, 2003, at 03:33 PM, Dion Almaer wrote: > This leads me to another issue actually. On certain range queries I > get exceptions: > > Query: modifieddate:[1/1/03 TO 12/31/03] > > org.apache.lucene.search.BooleanQuery$TooManyClauses I'm guessing you're using Field.Keyword(String, Date) for modifieddate? The date field stuff in Lucene is really a timestamp, and doing a range query enumerates all the terms for that field in that ranging making a big ol' boolean OR query of all the individual ones. Since you want this to be just a date, use Field.Keyword(String, "YYYYMMDD") instead. But.... you'll want to subclass QueryParser and override getRangeQuery to do the right date format parsing from "MM/DD/YYYY" into "YYYYMMDD" rather than the internal Date representation Lucene uses for "date" fields. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org