On 5/15/2014 1:34 AM, Alexandre Rafalovitch wrote: > I thought the date math rounding was for _caching_ the repeated > queries, not so much the speed of the query itself.
Absolutely correct. When NOW is used without rounding, caching is completely ineffective. This is because if the same query using NOW is sent multiple times several seconds apart, every one of those queries will be different after they are parsed and NOW is converted to an actual timestamp. > 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. Some nitty-gritty details of how range queries are accelerated with the Trie data types and precisionStep are described in the Javadoc for NumericRangeQuery: http://lucene.apache.org/core/4_8_0/core/org/apache/lucene/search/NumericRangeQuery.html Thanks, Shawn