lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashley Collins" <>
Subject QueryParser and date ranges?
Date Wed, 18 Dec 2002 13:50:27 GMT

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: 

The BlackBoxAnalyzer is just a custom Analyzer which doesn't tokenize fields 
called "sender" or "recipient".

Can anyone help?


MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message