-
-
Save anonymous/2ba2e3d0d50a5e4c777c to your computer and use it in GitHub Desktop.
ElasticSearch 16.2 differs from 16.1 in that this doesn't work any more.
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
#!/bin/bash | |
curl -XDELETE http://127.0.0.1:9200/geotest | |
curl -XPUT http://127.0.0.1:9200/geotest/geo/0 -d '{}' | |
curl -XPUT http://127.0.0.1:9200/geotest/geo/_mapping -d '{"geo" : {"properties" : {"locations" : {"type" : "geo_point"}}}}' | |
curl -XDELETE http://127.0.0.1:9200/geotest/geo/0 | |
curl -XPUT http://127.0.0.1:9200/geotest/geo/1 -d '{"locations":[{"lat":10.0,"lon":11.111111},{"lat":20.0,"lon":21.111111}]}' | |
sleep 1 | |
curl -XGET 'http://127.0.0.1:9200/geotest/geo/_search?pretty=true' -d '{"query":{"match_all":{}},"from":0,"size":20,"facets":{"geotest":{"geo_distance":{"locations":{"lat":30.134191,"lon":18.187612},"ranges":[{"to":100}]}}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment