Context
I have an index with a field called "date" which contains dates. I need an elasticsearch query that returns records where date is greater than a specific date value.
Issue
Running the following query with range filter returns does not work. Records with earlier dates are returned in the result set.
{
"size": 1000,
"query": {
"filtered": {
"filter": {
"range": {
"date": {
"gt": "2014-02-23T00:00:00"
}
}
}
}
}
}
Questions
- What is the correct query to pull data where date is greater than a specific value?
- If my query is syntactically correct, is there something else I can go check (e.g. datatype of field is actually date)?
- How should I go about root causing this?
- etc.