elasticsearch - 映射文件中的 ElasticSearch 纬度和经度 geo_type
问题描述
是否需要明确命名字段lat
并lon
进行geo_type
映射才能工作?例如,这是我的代码:
public class coordinates {
private String latitiude;
private String longitude;
}
弹性搜索中的示例映射文件:
"coordinates": {
"type": "geo_point"
}
我得到错误:
error': {'type': 'mapper_parsing_exception', 'reason': 'failed to parse field [coordinates] of type [geo_point]', 'caused_by': {'type': 'parse_exception', 'reason': 'field must be either [lat], [lon] or [geohash]'}}
还有其他方法吗?
解决方案
推荐阅读
- javascript - 如何将 HTML 元素数组转换为 NodeList?
- arrays - 如何根据数组中的某些条件用 Swift 中的常量减去每个 Int 值?
- react-native - 从本机模块反应本机时显示红屏错误
- java - 让其他线程等到 ScheduledExecutorService 完成所有任务
- mysql - 如何在 LOOKUP 中使用递归 CTE?
- javascript - 单击关闭按钮将关闭所有引导模型
- dialogflow-es - 我们可以在 Google Dialogflow 中创建对话循环吗
- c# - 我应该使用 .NET Core 还是 .NET 5?
- wpf - 在选择性组合框项目上带有复选框的组合框
- python - 如何打印用双引号而不是单引号括起来的python文本