lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <>
Subject Re: date range queries efficiency
Date Thu, 15 May 2014 07:34:57 GMT
I thought the date math rounding was for _caching_ the repeated
queries, not so much the speed of the query itself.

Also, if you are using TrieDateField, precisionStep value is how
optimization is done. There is bucketing at different level of
precision, so the range search works at the least granular level
first, etc.

Personal website:
Current project: - Accelerating your Solr proficiency

On Fri, May 9, 2014 at 5:41 PM, Dmitry Kan <> wrote:
> Hi,
> There was a mention either on solr wiki or on this list, that in order to
> optimize the date range queries, it is beneficial to round down the range
> values.
> For example, if a range query is:
> DateTime:[NOW-3DAYS TO NOW]
> then if the precision up to msec is not required, we can safely round that
> down to a day or hour, for example:
> What I'm wondering about is what other optimizations would make sense here
> on the indexing side? Luke shows that solr stores dates as longs with
> millisecond precision. So this seems to utilize the efficient Lucene
> numeric range queries internally.
> If we do not need msec precision on dates during search, does it make sense
> to also "round" dates down during indexing? Are there any other tips and
> tricks for efficient date range queries?
> Thanks!
> --
> Dmitry
> Blog:
> Twitter:

View raw message