This repository has been archived by the owner on Aug 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ny_by_year.json
88 lines (87 loc) · 2.69 KB
/
ny_by_year.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
POST http://localhost:9200/concerts/concert/_search
{
"size": 0,
"aggregations": {
"by_state": {
"terms": {
"field": "venue.state",
"include": "ny"
},
"aggregations": {
"by_year": {
"range": {
"field": "date.year",
"ranges": [
{ "from": 2012, "to": 2013 },
{ "from": 2013, "to": 2014 },
{ "from": 2014, "to": 2015 },
{ "from": 2015, "to": 2016 }
]
}
}
}
}
}
}
Response: {
"took": 9,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"hits": {
"total": 12,
"max_score": 0,
"hits": []
},
"aggregations": {
"by_state": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "ny",
"doc_count": 9,
"by_year": {
"buckets": [
{
"key": "2012.0-2013.0",
"from": 2012,
"from_as_string": "2012.0",
"to": 2013,
"to_as_string": "2013.0",
"doc_count": 2
},
{
"key": "2013.0-2014.0",
"from": 2013,
"from_as_string": "2013.0",
"to": 2014,
"to_as_string": "2014.0",
"doc_count": 2
},
{
"key": "2014.0-2015.0",
"from": 2014,
"from_as_string": "2014.0",
"to": 2015,
"to_as_string": "2015.0",
"doc_count": 1
},
{
"key": "2015.0-2016.0",
"from": 2015,
"from_as_string": "2015.0",
"to": 2016,
"to_as_string": "2016.0",
"doc_count": 4
}
]
}
}
]
}
}
}