lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: QueryParser and date ranges?
Date Wed, 18 Dec 2002 15:23:49 GMT
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" <acollin2@hotmail.com>
To: <lucene-user@jakarta.apache.org>
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:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message