Last active
February 17, 2017 16:45
-
-
Save lhzsantana/ad15ed27a3191f0a68f8 to your computer and use it in GitHub Desktop.
Campus Party
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
DELETE campusparty | |
PUT campusparty | |
GET /campusparty/onibus-csv/_mapping | |
POST /campusparty/onibus-csv/_mapping | |
{ | |
"onibus-csv": { | |
"properties": { | |
"linha": { | |
"type": "string" | |
}, | |
"velocidade": { | |
"type": "double" | |
}, | |
"localizacao": { | |
"type": "geo_point" | |
} | |
} | |
} | |
} | |
GET campusparty/_search | |
{ | |
"size": 0, | |
"query": { | |
"match_all": {} | |
}} | |
GET campusparty/_search | |
{ | |
"size": 0, | |
"query": { | |
"match_all": {} | |
}, | |
"aggs": { | |
"products": { | |
"terms": { | |
"field": "linha", | |
"size": 5 | |
} | |
} | |
} | |
} | |
GET campusparty/_search | |
{ | |
"size": 0, | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
} | |
} | |
}, | |
"aggs" : { | |
"articles_over_time" : { | |
"date_histogram" : { | |
"field" : "@timestamp", | |
"interval" : "5m" | |
} | |
} | |
} | |
} | |
GET campusparty/_search | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"geo_distance": { | |
"distance": "1km", | |
"localizacao": { | |
"lat": -22.90340110, | |
"lon": -43.1916759 | |
} | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment