Skip to content

Instantly share code, notes, and snippets.

@lhzsantana
Last active February 17, 2017 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lhzsantana/ad15ed27a3191f0a68f8 to your computer and use it in GitHub Desktop.
Save lhzsantana/ad15ed27a3191f0a68f8 to your computer and use it in GitHub Desktop.
Campus Party
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