Maybe Im just over thinking this, but I just want to do a simple filter / query on a numberic number.
I have a document with a timestamp and hour (0-23) have the query of data I need, but I need to filter / query it where docHour is greater than 23 (11:00pm) and less than 04 (4:00am) but Its just not working. What is the best way to do this kind of query. Do I use multiple ranges ???
The problem with that query is that I only want where time is greater than 11:00pm and less that 4:00am. I only need those hours per day. So I can't use the date part cause it will then use the date as well.
I do have a field for hour which is an integer that is from 0 - 23. Thats why I want to use hour .
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
Basically what I'm trying to do it...
1.) return records to me that are from Tue, Wed, or Thu. Now I also only want records that are from the hours of 11:00pm to 4:00am in the morning. I also have a DateTime field named ' measurement_timestamp ' if that is better to use, but to seperate and filter against the times and day it was suggested I have those fields seperate (thus the hours and DayOfWeek fields).
2.) sort asc
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.