JanusGraph地理索引

时间:2019-01-07 11:17:07

标签: java gremlin janusgraph

我有这种行为,第一次调用使用JanusGraph查询返回值

JG.query().has("geo_shape", Geo.WITHIN,
            Geoshape.circle(12, 13, 100.0)).vertices().count()

而下一行不返回结果!

 val c = JG.traversal().V().has("geo_shape",
            within(Geoshape.circle(12, 13, 100.0))).count().next()

1 个答案:

答案 0 :(得分:1)

根据query examples,您的查询应更像这样:

JG.traversal().V().has("geo_shape",
    geoWithin(Geoshape.circle(12, 13, 100.0))).count().next()