嘿,有谁能帮我弄清楚,我如何能够连接到远程JanusGraph服务器,并使用C# JanusGraph.net查询一个特定的图形(通过图形名称)?
我可以连接到服务器,但我不能查询一个特定的图形。
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c);
var g = Traversal().WithRemote(connection);
我们如何在JanusGrapgh.net中实现ConfiguredGraphFactory.create("graphName")或ConfiguredGraphFactory.open("graphName")?
DriverRemoteConnection
可以采取另一个参数,除了 GremlinClient
参数。
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c, "graphTraversalSourceName");
var g = Traversal().WithRemote(connection);
请注意,远程遍历并不与... Graph
的实例。它们对一个 GraphTraversalSource
所以你必须将 "graphTraversalSourceName "改为服务器上配置的对象之一的名称。当你不提供这个参数时,它只是顺便默认为 "g"。另外,请注意,.NET API文档可以在以下地方找到 此处.