Skip to content

Instantly share code, notes, and snippets.

@benwtrent
Created August 12, 2020 17:19
Show Gist options
  • Save benwtrent/0e283353fb378d67ee03ea649f03ef26 to your computer and use it in GitHub Desktop.
Save benwtrent/0e283353fb378d67ee03ea649f03ef26 to your computer and use it in GitHub Desktop.
PUT users/_mapping
{
"properties": {
"geo.location.point": {
"type": "geo_point"
}
}
}
POST users/_update_by_query
{
"script": {
"source": "ctx._source.geo.location.point = ctx._source.geo.location.lat + ',' + ctx._source.geo.location.lon",
"lang": "painless"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment