我在Elasticsearch索引字段與以下映射Elasticsearch 2.3地理形狀類型映射
"cluster_boundary": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1mm"
}
但是當我把這個映射中的elasticsearch指數出現以下錯誤
java.lang.IllegalArgumentException: maxLevels of 36 exceeds limit of 29
at org.apache.lucene.spatial.prefix.tree.PackedQuadPrefixTree.<init>(PackedQuadPrefixTree.java:70)
at org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper$GeoShapeFieldType.freeze(GeoShapeFieldMapper.java:276)
at org.elasticsearch.index.mapper.FieldMapper.<init>(FieldMapper.java:289)
at org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper.<init>(GeoShapeFieldMapper.java:428)
at org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper$Builder.build(GeoShapeFieldMapper.java:160)
at org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper$Builder.build(GeoShapeFieldMapper.java:119)
at org.elasticsearch.index.mapper.object.ObjectMapper$Builder.build(ObjectMapper.java:167)
at org.elasticsearch.index.mapper.DocumentMapper$Builder.<init>(DocumentMapper.java:88)
at org.elasticsearch.index.mapper.MapperBuilders.doc(MapperBuilders.java:44)
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:118)
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:99)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:498)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:257)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230)
at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:468)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
如果我將quadtree
更改爲geohash
它的工作原理。並且,根據elasticsearch,quadtree
中的最大允許樹級別爲50
。
感謝您的回覆。按照elasticsearch的文檔'''quadtree'''最多有50個級別。根據你所說的文件似乎是錯誤的。我會嘗試使用'''legacyquadtree'''。我已經嘗試過'''1m'''的精度,而樹的水平是'''33'''。 –