python - geojson 到 Elasticsearch:无法镶嵌形状
问题描述
我正在将一些 geojson 文件(大约 4000 ~ 5000 个多面特征)索引到 Elasticsearch 中。
这是映射
"mappings": {
"properties": {
"type": {
"type": "keyword"
},
"properties": {
"type": "object"
},
"geometry": {
"type": "geo_shape"
}
}
}
我的索引代码如下所示:
helpers.bulk(es, k, chunk_size=500, request_timeout=1000)
索引操作(在块中)被此错误消息停止:
{'type': 'mapper_parsing_exception', 'reason': 'failed to parse field [geometry] of type [geo_shape]', 'caused_by': {'type': 'illegal_argument_exception', 'reason': 'Unable to Tessellate shape
这个错误的原因是什么?
索引 geojson 文件时可以忽略此错误吗?
解决方案
我查看了这个问题,多边形是有效的,并发现了 Lucene tessellator 中的一个错误。我开了一个问题:
https://issues.apache.org/jira/browse/LUCENE-9417
修复在这里:
推荐阅读
- c++ - DNN 精度低
- bootstrap-4 - 即使尚未单击,切换按钮也已折叠
- c# - Task.WaitAll 与 Task.WhenAll 的线程池和数据库连接池 - 负载较重
- python - 将 scipy.signal.stft 数据传递给 librosa.feature.melspectrogram
- postgresql - PostgreSQL。存储函数或查询改进
- java - 我有一个 Java 程序,上面写着“索引 1 超出长度 1 的范围”
- git - Kubernetes 集群上的 Gitlab - 无法使用 git 克隆或推送
- cython - 编写 cython 库的性能不佳
- python - Spyder Python 3.7 为什么有些方法在点后没有显示?
- python - 如何使用python中的where子句从firestore中的数组中删除元素