1
不會產生我有如下創建的索引:地理散列的彈性搜索
POST /cabtrails
{
"settings" :
{
"number_of_shards" : 3,
"number_of_replicas" : 1
},
"mappings" : {
"cabtrail" :{
"properties" : {
"location": {
"type": "geo_point",
"geohash_prefix": true,
"geohash_precision": "5m"
},
"capture_time": {
"type" : "long"
},
"client_id": {
"type" : "long"
}
}
}
}
}
它工作正常,並創建一個索引。
我已經進入了一個樣本文檔:
POST cabtrails/cabtrail
{
"capture_time": 1431849367077,
"client_id": 865527029812357,
"location": "13.0009316,77.5947316"
}
這工作得很好,以及。 在這裏,我期待ElasticSearch將生成一個我可以使用的geohash字段/條目。
但是,當我詢問,我得到這個:
GET cabtrails/_search
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "cabtrails",
"_type": "cabtrail",
"_id": "AU2LrEaze2aqxPjHm-UI",
"_score": 1,
"_source": {
"capture_time": 1431849367077,
"client_id": 865527029812357,
"location": "13.0009316,77.5947316"
}
}
]
}
}
我在查詢結果中,我可以用它來查詢未來的位置點某處期待地緣散串狀u10hbp
。或者我的geohash + ES的概念搞砸了?幫幫我!!