Not if I'm reading this right. You want the docs from June 1 with a timestamp between 13:00 and 16:00 but not one from, say, 11:00. Ditto for the other days, right?
If it's a predictable interval or a predictable granularity (i.e. the resolution you want is always going to be even hours) you could index a field hour_of_day in which case the query is something like timestamp:[2016-06-01T00:00:00Z TO 2016-06-10T59:59:59Z] AND hour_of_day:[13 TO 16]. That falls down if the intervals need to be arbitrary of course. There might be something tricky you can do with geospatial believe it or not. I confess I have to look it up every time, but here's a place to start: https://wiki.apache.org/solr/SpatialForTimeDurations Best, Erick On Fri, Jul 22, 2016 at 3:26 PM, Felipe Vinturini <felipe.vintur...@gmail.com> wrote: > Hi all, > > Is there a way to query solr between dates and query like "intraday", > between hours in those days? Something like: I want to search field "text" > with value: "test" and field "date" between 20160601 AND 20160610 and > between only hours of those days: 1PM AND 4PM? > > I know I could loop over the dates, I just would like to know if there is > another way to do it in Solr. My Solr version is: 4.10.2. > > Also, is there a "name" for these kind of queries? > > Thanks a lot for your attention and help. > > Regards, > Felipe.