gettting Vertices by Property<key,value>

16 views
Skip to first unread message

Sitanshu Rai

unread,
Jun 16, 2016, 11:37:58 AM6/16/16
to Aurelius
Hi guys,
I am using titan-1.1.0 (built from source) for my graph project.
I am using the titan java API to parse some files and build a graph from it.
Can anyone tell me the method to get the Vertices of the titan graph by the property value ?
Any help is much appreciated.
Thanks,
Sitanshu.

Jason Plurad

unread,
Jun 16, 2016, 1:50:41 PM6/16/16
to Aurelius
https://github.com/pluradj/titan-tp3-java-example/blob/master/src/main/java/pluradj/titan/tinkerpop3/example/JavaExample.java#L39-L40

        GraphTraversalSource g = graph.traversal();
       
Vertex fromNode = g.V().has("name", "marko").next();

Jason Plurad

unread,
Jun 16, 2016, 1:52:01 PM6/16/16
to Aurelius
See also the Apache TinkerPop documentation. Much of the structure/query functionality in Titan is actually TinkerPop.

http://tinkerpop.apache.org/docs/3.0.1-incubating/#graph-traversal-steps
Reply all
Reply to author
Forward
0 new messages