I'm using the gremlin console v3.3.1. Using the "Modern" graph from the tutorial: http://tinkerpop.apache.org/docs/current/tutorials/getting-started/
Creating the graph with this:
gremlin>graph = TinkerFactory.createModern()
gremlin>g = graph.traversal()
I can find all the people that know "vadas" like this:
g.V().hasLabel('person').has('name', 'vadas').in('knows').hasLabel('person').valueMap()
And I can find all the people that created the software "lop" with this:
g.V().hasLabel('software').has('name', 'lop').in('created').hasLabel('person').valueMap()
I can find all the people that know "vadas" OR created "lop" with a union operation:
g.V().union(
g.V().hasLabel('person').has('name', 'vadas').in('knows').hasLabel('person'),
g.V().hasLabel('software').has('name','lop').in('created').hasLabel('person')
).dedup().valueMap()
But I can't figure out how to find all the people that know "vadas" AND created "lop". Essentially I want an INTERSECT operation (I think), but there is no such thing that I can find.
Any help?