嘿,谁能帮我弄清楚如何连接到托管多个图形的远程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")
发布于 2020-04-27 19:15:02
除了GremlinClient参数之外,DriverRemoteConnection还可以接受另一个参数:
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c, "graphTraversalSourceName");
var g = Traversal().WithRemote(connection);请注意,远程遍历不绑定Graph实例。它们绑定在一个GraphTraversalSource上,所以您必须将"graphTraversalSourceName“更改为服务器上某个已配置对象的名称。当您不提供此参数时,顺便说一句,它只是缺省为"g“。另外,请注意,可以在here中找到.NET应用程序接口文档。
https://stackoverflow.com/questions/61393535
复制相似问题