Created
March 22, 2013 10:41
-
-
Save maharg101/5220406 to your computer and use it in GitHub Desktop.
elasticsearch date arithmetic behaviour oddity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sort": [ | |
{ | |
"publication_time": { | |
"order": "desc" | |
} | |
} | |
], | |
"from": 0, | |
"size": 3, | |
"fields": [ | |
"headline" | |
], | |
"query": { | |
"query_string": { | |
"query": "+publication_time:[now-5m TO now]" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sort": [ | |
{ | |
"publication_time": { | |
"order": "desc" | |
} | |
} | |
], | |
"from": 0, | |
"size": 3, | |
"fields": [ | |
"headline" | |
], | |
"query": { | |
"query_string": { | |
"query": "+publication_time:[now-5m TO 2013-03-23]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment