0

According to this the following query:

g.V(ids).as("a").repeat(bothE().otherV().simplePath()).times(5).emit(hasId(within(ids))).as("b").filter(select(last,"a","b").by(id).where("a", lt("b"))).path().by().by(label)

does not work in datastax graph because the lt("b") part cannot work on datastax id which is a json format

{
    '~label=person',
    member_id=54666,
    community_id=505443455
}

How can I change the lt("b) part in order the query to work ?

Please help

stephen mallette
  • 45,298
  • 5
  • 67
  • 135

1 Answers1

3

You can pick any property that is comparable. E.g., if all your vertices have a name property:

g.V(ids).as("a").repeat(bothE().otherV().simplePath()).times(5).
    emit(hasId(within(ids))).as("b").
  filter(select(last,"a","b").by("name").where("a", lt("b"))).
  path().by().by(label)
Daniel Kuppitz
  • 10,846
  • 1
  • 25
  • 34