Last active
October 30, 2016 15:41
-
-
Save gaving/8aa5d9215a37471910704f4ff19ef619 to your computer and use it in GitHub Desktop.
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
curl 'http://demo.searchkit.co/api/crimes/_search' -H 'Pragma: no-cache' -H | |
'Origin: http://localhost:3000' -H 'Accept-Encoding: gzip, deflate' -H | |
'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel | |
Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 | |
Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: | |
application/json, text/plain, */*' -H 'Cache-Control: no-cache' -H 'Referer: | |
http://localhost:3000/?q=vehicle' -H 'Connection: keep-alive' --data-binary | |
'{"query":{"bool":{"must":[{"simple_query_string":{"query":"vehicle","fields":["_all"]}},{"filtered":{"filter":{"geo_bounding_box":{"location":{"top_left":{"lat":53.392898919706695,"lon":-2.7354970773689913},"bottom_right":{"lat":52.10973203721954,"lon":0.09139421328345267}}}}}}]}},"aggs":{"geo":{"filter":{},"aggs":{"areas":{"geohash_grid":{"field":"location"},"aggs":{"cell":{"geo_bounds":{"field":"location"}}}},"bounds":{"geo_bounds":{"field":"location"}}}}},"size":0}' | |
--compressed |
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
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"simple_query_string": { | |
"query": "vehicle", | |
"fields": [ | |
"_all" | |
] | |
} | |
}, | |
{ | |
"filtered": { | |
"filter": { | |
"geo_bounding_box": { | |
"location": { | |
"top_left": { | |
"lat": 53.392898919706695, | |
"lon": -2.7354970773689913 | |
}, | |
"bottom_right": { | |
"lat": 52.10973203721954, | |
"lon": 0.09139421328345267 | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"aggs": { | |
"geo": { | |
"filter": {}, | |
"aggs": { | |
"areas": { | |
"geohash_grid": { | |
"field": "location" | |
}, | |
"aggs": { | |
"cell": { | |
"geo_bounds": { | |
"field": "location" | |
} | |
} | |
} | |
}, | |
"bounds": { | |
"geo_bounds": { | |
"field": "location" | |
} | |
} | |
} | |
} | |
}, | |
"size": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment