user4808924
user4808924

Reputation: 31

finds all the paths between a group of defined vertices in datastax dse graph

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

Upvotes: 0

Views: 79

Answers (1)

Daniel Kuppitz
Daniel Kuppitz

Reputation: 10904

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)

Upvotes: 3

Related Questions