Last active
December 1, 2017 09:01
-
-
Save gaving/e5efcd55ad4c6e637718097ec2206441 to your computer and use it in GitHub Desktop.
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
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.9' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 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=theft' -H 'Connection: keep-alive' --data-binary \@request.json --compressed |
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
{ | |
"error": { | |
"root_cause": [ | |
{ | |
"type": "query_shard_exception", | |
"reason": "failed to find geo_point field [location]", | |
"index_uuid": "jh7WcC8sSn-w6n6pEaS27A", | |
"index": "crimes" | |
} | |
], | |
"type": "search_phase_execution_exception", | |
"reason": "all shards failed", | |
"phase": "query", | |
"grouped": true, | |
"failed_shards": [ | |
{ | |
"shard": 0, | |
"index": "crimes", | |
"node": "rHYVvIt0Ry-jp1Ih5zGDew", | |
"reason": { | |
"type": "query_shard_exception", | |
"reason": "failed to find geo_point field [location]", | |
"index_uuid": "jh7WcC8sSn-w6n6pEaS27A", | |
"index": "crimes" | |
} | |
} | |
], | |
"caused_by": { | |
"type": "query_shard_exception", | |
"reason": "failed to find geo_point field [location]", | |
"index_uuid": "jh7WcC8sSn-w6n6pEaS27A", | |
"index": "crimes" | |
} | |
}, | |
"status": 400 | |
} |
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
{ | |
"query": { | |
"bool": { | |
"must": { | |
"match_all": {} | |
}, | |
"filter": { | |
"geo_bounding_box": { | |
"location": { | |
"top_left": { "lat": 60.56815526587194, "lon": -25.82202499999999 }, | |
"bottom_right": { | |
"lat": 44.81313043523214, | |
"lon": 9.334224999999993 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"aggs": { | |
"geo": { | |
"filter": { "match_all": {} }, | |
"aggs": { | |
"areas": { | |
"geohash_grid": { "field": "location" }, | |
"aggs": { "cell": { "geo_bounds": { "field": "location" } } } | |
}, | |
"bounds": { "geo_bounds": { "field": "location" } } | |
} | |
} | |
}, | |
"size": 20 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment