lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <>
Subject RangeQuery With Date
Date Mon, 07 Feb 2005 20:46:08 GMT

I am working on a set of queries that allow you to find modification dates
before, after and equal to a given date.

Here are some of the before queries I have been playing with. I want a query
that pull up dates modified before Nov 11 2004:

Query query = new RangeQuery(null, new Term("modified", "11/11/04"), false);

This one doesn't work. It turns up all the documents in the index.

Query query = QueryParser.parse("modified:[1/1/00 TO 11/11/04]", "subject",
new StandardAnalyzer());

This works but I don't like having to specify the begin date like this.

Query query = QueryParser.parse("modified:[null TO 11/11/04]", "subject",
new StandardAnalyzer());

This throws an exception.

How are other doing a Query like this?



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

View raw message