首页 > 解决方案 > 如何在 gremlinpython 中使用 geoshape

问题描述

在 JanusGraph 中,有一些功能,如

 g.E().has('place', geoWithin(Geoshape.circle(37.97, 23.72, 50)))

搜索地点数据。现在我想使用gremlinpython来做到这一点,但我无法从文档中找到合适的 API。

标签: gremlinjanusgraphgremlinpython

解决方案


Gremlin 尚不支持地理数据类型和谓词。您引用的语法位特定于 JanusGraph,并且是其库的一部分。在这一点上,我不相信 JanusGraph 有一个 Python 特定的库来让你直接访问这些东西。如果您需要使用地理搜索,那么现在,您需要使用该语法向 JanusGraph 服务器提交一个 Gremlin 脚本。


推荐阅读