lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: date range querys
Date Sun, 11 Mar 2007 16:20:00 GMT
Search the mail archive for DateRange, Date, DateTools
ConstantScoreRangeQuery, etc and you'll find a wealth of
discussion on dates, which turn out to be
more complex than you think <G>...

But the first thing I'd think about is your resolution. Understand
that range queries may assemble a giant OR query for all
the values in your index that fall in the range. Also remember
that dates are simply strings, they aren't a distinct data type.

So, it looks from your example like you're storing your dates with
varying resolutions, and possibly assembling far larger queries
than you think.

I suspect that if you stored your dates (use DateTools) as strings
with a resolution of a day you'd get much faster queries, assuming
that this is fine enough for your app.


On 3/11/07, Thomas Klein <> wrote:
> Hi there,
> I'm indexing a lot of documents with lucene and I'm really happy with
> it :)
> Observing my users, I understand they are querying only small range of
> time. Often, they only read results back from 1 month.
> I got some years in my 1.3Go index. Querys takes some seconds getting
> and returning docs IDs.
> I'm indexing a some date field like that :
> 20060612223456
> 2006061222
> 20060612
> 200606
> 2006
> In your opinion, will range query be fast enough or will I need to
> create, for exemple, one index per month and then open and parse them
> regarding querys ?
> Regards,
> Thomas.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message