lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Date Range Query Feature Implementation
Date Mon, 30 Apr 2012 08:03:37 GMT

Thanks for your input. One citation from your report:

"These types of searches are uncommon, and thus programmers don't optimize
for this case. Lucene, for example, has the ability to filter search results
using date-ranges, but it is a slow, naive algorithm implemented through
lexographic range searching on a custom field. Which is a user level hack
that works ineffectively. There are no known other ways of performing a date
range search."

Since Lucene 2.9 / Solr 1.4, Lucene can handle numerical ranges without "a
slow, naive algorithm", see NumericRangeQuery and NumericField. As every
date can be represented as a number (e.g. year as integer, or milliseconds
since 1970 as long,...), date searches can be done easily with Lucene (and
very fast, because the intersection between the NumericRangeQuery and the
TermQuery are done using ConjunctionScorer which does *not* naivly iterate
the postings).

Did you consider this in your implementation?


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: John Mercouris []
> Sent: Monday, April 30, 2012 9:24 AM
> To:
> Subject: Date Range Query Feature Implementation
> Hello we (John Mercouris & Nick Zivkovic) have implemented date range
> search functionality into Lucene as part of a class project. The
> is detailed in the PDF attached. The source is available for download from
> github at the URL: git://
> We hope that you find this useful,
> -John & Nick

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

View raw message