Use case: Get a sub graph of person by city lookup (with all associated
edges and the vertices) in one query in Java.
When I used GremlinPipe:
GremlinPipeline startPipe = pipe.has("city-name",
"NY").inE("city-depends").outV();
Using this I get the result but to get additional inof i need to make
further calls
: [v(Person)[#15:13], v(Person)[#15:7], v(Person)[#15:12],
v(Person)[#15:11], v(Person)[#15:10], v(Person)[#15:9], v(Person)[#15:8]]
I used sideEffect and did the following but still get the same result
(person info) and not the graph.
List list = pipe.has("city-name",
"NY").inE("city-depends").outV().sideEffect(new PipeFunction<Vertex,
Vertex>() {
public Vertex compute(Vertex it) {
temp.add(it.getEdges(Direction.IN, "friends"));
return it;
}
}).toList();
Using this I get List<edge> with friends information. Do i need to again
create a list add edges like this if i need to traverse another edge for
example owns which is also from person ?
I read and used "traverse" in orientdb sql which provides the graph. Is
there any gremlin equivalent or any other efficient way to get the sub
graph.
Any help is greatly appreciated. Thanks !!
Sabari
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.