关于 QueryParsingException[[——index] failed to find geo_point field [xxxx]];的解决
由于刚换工作业务上有涉及到关于elasticsearch的操作,但是还没来的及学习这门技术就被分配到改相关位置的bug,所以也是一路各种百度,下面来看看具体的解决方案吧。
这是我的请求。
错误信息:
找了两三天,各种没有头绪,最后在官方文档中找到了,原因 (https://www.elastic.co/guide/en/elasticsearch/reference/1.7/mapping-geo-point-type.html,文档地址)
其实就是在我们建立mapping的时候就要将loction的类型设置为 geo_point
由于这次的bug也让我对elasticsearch产生了很大的兴趣,决心要学习这门技术。