Aye, make sense to add a dedicated filter for this, care to open an issue?

On Jul 8, 2014, at 6:06, vineeth mohan <[email protected]> wrote:

> Hello Tom ,
> 
> At this point , i can think of 2 approaches - 
> 
> Store an additioanl field with just the time and not the date information. Do 
> a normal range query here.
> Create script filters - In the filter , take the time out and check the 
> range.    
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html
> 
> But then this is a common use case and some elegant way to do it should exist.
> If not , I will create a bug.
> 
> Thanks
>             Vineeth
> 
> 
> 
> On Tue, Jul 8, 2014 at 7:19 AM, Tom Miller <[email protected]> wrote:
> All of the examples I can find on the web relate to date-range filtering. 
> What I need is a time-range filter: i,e
> 19:00 - 23:30.
> 
> So, in this example, I want all hits between 7PM and 11:30, regardless of the 
> day...
> 
> I'd do this in SQL by doing "Where TIME(column) BETWEEN x and y".
> 
> Is this possible in elasticsearch?
> 
> My only solution thus far is to date_histogram by hour, and then filter on 
> the client and add them up, which is kinda lame...
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/943a4cca-ee2c-497a-840e-be39ad821a0f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/CAGdPd5kFZMt1nuUfBJkwPuFkBCGN4ZUHXESxPn6Ccy9F0QL5xA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/D18BC2AF-20BF-4CC1-94B7-B189E9193607%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to