Skip to content

Instantly share code, notes, and snippets.

@jim-at-jibba
Created March 2, 2020 11:16
Show Gist options
  • Save jim-at-jibba/2abde6a562cbcc75edbbf9fdadf3f354 to your computer and use it in GitHub Desktop.
Save jim-at-jibba/2abde6a562cbcc75edbbf9fdadf3f354 to your computer and use it in GitHub Desktop.
Candide Elastic Search - Add come data
PUT my_index/_doc/1
{
"text": "Geo-point as an object",
"location": {
"lat": 41.12,
"lon": -71.34
}
}
PUT my_index/_doc/2
{
"text": "Geo-point as a string",
"location": "41.12,-71.34"
}
PUT my_index/_doc/3
{
"text": "Geo-point as a geohash",
"location": "drm3btev3e86"
}
PUT my_index/_doc/4
{
"text": "Geo-point as an array",
"location": [ -71.34, 41.12 ]
}
PUT my_index/_doc/5
{
"text": "Geo-point as a WKT POINT primitive",
"location" : "POINT (-71.34 41.12)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment