Been stuck on this for a while.
In Python, I'm using the Tweepy and Elasticsearch libraries to stream tweets to an Elasticsearch index. In my Python script, my index is created as:
settings = {
'settings': {
'number_of_shards': 1,
'number_of_replicas': 0
},
'mappings': {
'tweet': {
'_all': {'enabled': 'false'},
'_timestamp': {'enabled': 'true'},
'properties': {
'id': {'type': 'long'},
'text': {'type': 'text'},
'name': {'type': 'text'},
'screen_name': {'type': 'text'},
'coordinates': {'type': 'geo_point'}
}
}
}
}
A separate script, stream.py, collects tweets and indexes certain information. If a place in the tweet is available, I calculate the center from the provided bounding box. Sample (from printing to console) coordinates include:
place found and calculated
[42.43, -82.9]
place found and calculated
[33.55, -112.12]
place found and calculated
[40.03, -75.37]
place found and calculated
[19.43, -99.15]
The script rounds the coordinates to two decimal places. Whenever I attempt to visualize on a map in Kibana, I get the error "Visualize: Expected geo_point type on field [coordinates], but got [float]."
As far as I can tell, though, this array of coordinates is in the exact format a geo_point should be (https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html).
Any ideas? I know plotting location data from Twitter is fairly common for ELK, but it seems like syntax is always changing.