Created
January 26, 2016 15:59
-
-
Save up1/4874b9a892d54ccd959a to your computer and use it in GitHub Desktop.
Elasticsearch :: sample date
This file contains hidden or 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
| PUT log/web/1 | |
| { | |
| "name" : "test", | |
| "loged_date" : "2016/01/26 11:11:11" | |
| } | |
| PUT log/web/2 | |
| { | |
| "name" : "test", | |
| "loged_date" : "2016/01/27 11:11:11" | |
| } | |
| PUT log/web/2 | |
| { | |
| "name" : "test", | |
| "loged_date" : "2016/01/28 11:11:11" | |
| } | |
| GET log/web/_mapping | |
| GET log/web/_search | |
| { | |
| "size": 0, | |
| "aggs": { | |
| "by_date": { | |
| "date_histogram": { | |
| "field": "loged_date", | |
| "interval": "day" | |
| } | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment