【发布时间】:2015-07-30 20:17:26
【问题描述】:
我已经索引了一些包含 GEOJson 点对象的条目:
示例:
{
"_id": "48LEDd5imvEpFnCQx",
"loc": {
"type": "Point",
"coordinates": [-2.7577078342437744, 47.65381454210301]
},
"geoip": false,
"trackerId": "RG-DEMO-1",
"date": "2015-07-25T21:12:07.286Z"
}
映射:
{
'trace': {
'properties': {
'loc': {
'type': 'nested',
'properties': {
'type': {
'type': 'string'
},
'coordinates':{
'type': 'geo_point',
'geohash':true,
'geohash_prefix':true,
'lat_lon':true,
'fielddata' : {
'format' : 'compressed',
'precision' : '1cm'
}
}
}
...
geohash 已生成,但 Kibana 说 loc.coordinates 未编入索引,我无法使用可视化地图 Unindexed fields can not be searched
在这种类型的字段上强制索引的技巧是什么?
【问题讨论】:
-
对我有用吗?检查 curl -XPOST
/_search" -d' { "sort": [ { "loc.coordinates.geohash" : {"order" : "desc"} } ] }' 你应该能够查看geohash值 -
没错!您的查询向我展示了 geohash。但是为什么我无法通过 Kibana 访问? (我现在正在打电话。我会尽快重写问题)
标签: elasticsearch kibana