- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我们的文档:
{
"geometry" : {
"type" : "Point",
"coordinates" : [ -87.662682, 41.843014 ]
}
}
我们想要使用 _geo_distance
排序进行 geo_shape
搜索,两者都针对相同的 geometry
字段。前者需要geo_shape
类型而后者需要geo_point
。
这两个索引单独成功,但不一起:
"geometry": {
"type": "geo_shape"
}
和
"geometry": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
},
到目前为止,我们已经尝试了这些但失败了:
"geometry": {
"type": "geo_shape"
},
"geometry.coordinates": {
"type": "geo_point"
},
还有
"geometry": {
"copy_to": "geometryShape",
"type": "geo_shape"
},
"geometryShape": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
还有
"geometry": {
"copy_to": "geometryShape",
"properties": {
"coordinates": {
"type": "geo_point"
}
}
},
"geometryShape": {
"type": "geo_shape"
}
关于如何正确创建这个索引有什么想法吗?
最佳答案
如果启用了脚本,那么您可以通过指定 transforms 来实现它在映射中
会在这些行上看起来像一些东西:
put test/test_type/_mapping
{
"transform": {
"script": "if (ctx._source['geometry']['coordinates']) ctx._source['test'] = ctx._source['geometry']['coordinates']",
"lang": "groovy"
},
"properties": {
"geometry": {
"type": "geo_shape"
},
"coordinates": {
"type": "geo_point"
}
}
}
关于elasticsearch - 如何同时使用 Elasticsearch 的 geo_point 和 geo_shape 类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29855726/
我正在使用logstash将来自csv的地理空间数据作为geo_points输入到elasticsearch。 CSV如下所示: $ head -5 geo_data.csv "lon","lat",
来自此处的文档:http://www.elasticsearch.org/guide/reference/mapping/geo-point-type.html 它说 geo_point 接受不同的格
您好,我正在尝试在 ElasticSearch 中查询 geo_point,使用查询语法 geo polygon filter 在官方文档中],但是没有返回结果。 这里有一些细节:我用 river p
我正在使用 NEST .net 客户端进行 Elastic Search。我有一个带有 Location 属性的 Address 类。 public class Address { public st
我的 grok 过滤器(工作)的一部分抓取了以下两个字段: %{NUMBER:XCent} %{NUMBER:Ycent} 这是纬度,长点。 我正在尝试添加一个位置引脚,但在我的配置文件中使用 --d
我试图通过索引单个文档来遵循文档中的示例: curl -XPUT 'localhost:9200/graph/nodes/1' -d' { "pin" : { "
我正在尝试更新我的Elasticsearch索引中geo_point字段的映射,但是遇到了问题。我在Kibana中使用开发工具控制台。 geo_point的数据采用双数组格式。我正在将spark与el
我想将一些 JSON 持久化到 elastic(search),看起来有点像这样: { "name": "value", "points": [ { "lat": 0.0, "lon"
我正在尝试针对嵌套在对象 (Location) 中的 geo_point (geo_coordinates) 进行过滤,该对象嵌套在查询对象 (MyObject) 的数组中。 问题是对象 MyObje
我们在模型中有两个单独的纬度和经度字段。我们如何创建映射以在 ElasticSearch 中从中创建 geo_point 类型? 最佳答案 您需要创建一个类型为 geo_point 的新字段 映射 {
尝试按如下方式构建搜索: { "query": { "filtered": { "query": { "match_all": {} },
我想使用 Grafana 世界地图来显示(聚合)点,这些点以 geo_point 字段类型存储在 elasticsearch 中。但它失败了。 Grafana 报告“错误:缺少 geohash 值”
我遇到了一个与 elasticsearch 相关的问题 geo_point 从数据库导入时。 如果 的值,我的映射效果很好龙 或 纬度 字段包含实际值。 现在可能发生某些行包含 空值 为 经纬度如果我
我有一些具有以下格式的日志(我将 IP 从公共(public)更改为私有(private),但你明白了): 192.168.0.1 [20/Nov/2019:16:09:28 +0000] GET /
我有一个用于使用elasticsearch geopoint 的Spring Boot 应用程序。当我保存弹性索引并创建 geoDistanceQuery 时,我收到 QueryShardExcept
我指的是这个 Geo Distance Query Elasticsearch 文档中给出的示例。 版本:5.3 按照教程,我执行了这个查询以在索引中插入数据 PUT /my_locations/lo
我正在尝试将 mysql 数据(动态更改)与 elasticsearch 同步。我使用 logstash 进行同步。我需要过滤 1KM 半径内的车辆列表以获取通过的 geo_points。在 elas
我可以在我的默认映射中看到 geoip.location 映射到 geo_point 类型: GET myserver:9200/_template { "logstash": {
我有一个具有以下映射的索引: { "mappings":{ "my_stuff_type":{ "properties":{ "location": {
这是我们的文档: { "geometry" : { "type" : "Point", "coordinates" : [ -87.662682, 41.843
我是一名优秀的程序员,十分优秀!