Re: date range queries efficiency

2014-05-21 Thread Dmitry Kan
Thanks, Erick! On Tue, May 20, 2014 at 3:55 AM, Erick Erickson wrote: > This might be useful: > http://searchhub.org/2012/02/23/date-math-now-and-filter-queries/ > > Best, > Erick > > On Mon, May 19, 2014 at 12:09 AM, Dmitry Kan wrote: > > Thanks, Jack, Alex and Shawn. > > > > This makes proper

Re: date range queries efficiency

2014-05-19 Thread Erick Erickson
This might be useful: http://searchhub.org/2012/02/23/date-math-now-and-filter-queries/ Best, Erick On Mon, May 19, 2014 at 12:09 AM, Dmitry Kan wrote: > Thanks, Jack, Alex and Shawn. > > This makes proper sense. One win of rounding down on indexing side is > saving index space, according to hos

Re: date range queries efficiency

2014-05-19 Thread Dmitry Kan
Thanks, Jack, Alex and Shawn. This makes proper sense. One win of rounding down on indexing side is saving index space, according to hoss (reply over IRC): "with the TrieDateFields, rounding dates at indexing time won't have any effect on the cachability of the rounded queries, and even for non c

Re: date range queries efficiency

2014-05-16 Thread Shawn Heisey
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 u

Re: date range queries efficiency

2014-05-16 Thread Alexandre Rafalovitch
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 gran

Re: date range queries efficiency

2014-05-16 Thread Jack Krupansky
exact query matches such as year without expanding the date to a range for the full interval. -- Jack Krupansky -Original Message- From: Dmitry Kan Sent: Friday, May 9, 2014 6:41 AM To: solr-user@lucene.apache.org Subject: date range queries efficiency Hi, There was a mention eith

date range queries efficiency

2014-05-16 Thread Dmitry Kan
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 tha