Search code examples
javagremlinjanusgraph

JanusGraph Geo Index


I have this behavior the first call returns values using JanusGraph query

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

while the next line doesn't return results !

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

Solution

  • According to the query examples your query should look more like this:

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