我试图用python创建一个elasticsearch索引,其内容是一系列坐标,以便以后在kibana地图中可视化这些数据
不幸的是,我收到了以下错误消息:
RequestError(400, 'parse_exception', 'unknown key [properties] for create index')
这是我正在使用的代码:
es = Elasticsearch()
mappings = {
"properties": {
"geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
es.indices.create(index='geodata', body=mappings)
es_entries['geo']={ 'location': str(coor[0])+","+str(coor[1])}
es.index(index='geodata', doc_type="doc", body=es_entries)
到目前为止做得很好,你就快到了。需要做一些更改:
相关问题 更多 >
编程相关推荐