2015-03-13 84 views
0

蒙戈连接器用来推动从服务器具有地理位置的数据作为地理位置elasticsearch

"location":{ 
    "coordinates" : { 
     "lon":-77.03653, 
     "lat": 38.897676 
     } 
    } 

改变位置的性能

"properties" :{ 
     "location" :{ 
      "type": "object", 
      "properties" :{ 
       "coordinates": { 
        "type" : "geo_point", 
        "geohash": "true", 
        "geohash_prefix": "true" 
       } 
      } 
     } 
} 

是越来越填充的数据,但kibana在“瓷砖地图”上没有显示任何数据

有什么我不见了

回答

1

如前所述,使用dynamic mapping不能自动检测地理点。在将数据插入数据库之前,需要创建数据的映射。

curl -XPOST :9200/databasename -d'{ 
    "mappings": { 
     "tablename": { 
     "properties": { 
      "geojson_field": {"type": "geo_point"} 
     } 
     } 
    } }' 

请检查github进一步阅读。