Replace your blank with "null" - then it should work. Also, note that the
syntax has changed with the latest release: you need to replace the dash
("-") with "TO".
Regrds,
Terry
----- Original Message -----
From: "Ashley Collins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 8:50 AM
Subject: QueryParser and date ranges?
>
> 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:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>