Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 74127 invoked from network); 18 Dec 2002 13:50:48 -0000 Received: from exchange.sun.com (HELO nagoya.betaversion.org) (192.18.33.10) by daedalus.apache.org with SMTP; 18 Dec 2002 13:50:48 -0000 Received: (qmail 5517 invoked by uid 97); 18 Dec 2002 13:51:56 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 5484 invoked by uid 97); 18 Dec 2002 13:51:54 -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 5472 invoked by uid 98); 18 Dec 2002 13:51:53 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Originating-IP: [194.130.58.131] From: "Ashley Collins" To: lucene-user@jakarta.apache.org Bcc: Subject: QueryParser and date ranges? Date: Wed, 18 Dec 2002 13:50:27 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 18 Dec 2002 13:50:27.0617 (UTC) FILETIME=[6BF5B910:01C2A69C] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm having trouble with date ranges...It seems that if the lower bound in the range is left blank, the upper bound becomes the first value of the parsed query. Which means, that I get results after the end date instead of before it. Here is some of my debug output when both lower and upper bounds exist: Query is date_sent:[0d7zcfeo0 - 0d94s7400] Parsed query is: date_sent:[0d7zcfeo0-0d94s7400] But this is what happens when the lower bound is blank: Query is date_sent:[ - 0d94s7400] Parsed query is: date_sent:[0d94s7400-null] Here's the code which produces this output... log(Level.DEBUG, "Query is " + query); Analyzer analyzer = new BlackBoxAnalyzer(); Query luceneQuery = QueryParser.parse(query, "message_keywords", analyzer); log(Level.DEBUG, "Parsed query is: "+luceneQuery.toString("message_keywords")); The BlackBoxAnalyzer is just a custom Analyzer which doesn't tokenize fields called "sender" or "recipient". Can anyone help? Thanks. Ashley _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: For additional commands, e-mail: