用于查找交叉点的良好图形数据库(Neo4j?Pegasus?Allegro?...)
我正在寻找一个好的图形数据库来查找集合交集 - 取任意两个节点并查看它们的边缘端点是否“重叠”。社交网络类比是两个人观察两个人,看看他们是否连接到同一个人。
我尝试让 FlockDB(来自 Twitter 的人员)正常工作,因为交集函数是内置的,但发现在用户社区/支持方面没有太多。那么其他图形数据库的任何建议,特别是在我正在寻找的交叉功能已经存在的情况下......?
I'm looking for a good graph database for finding set intersections -- taking any two nodes and looking at whether their edge endpoints "overlap." Social network analogy would be two look at two people and see whether they are are connected to the same people.
I've tried to get FlockDB (from the folks at Twitter) working, because intersection functions are built in, but found there wasn't much in terms of user community/support. So any recommendations of other graph databases, especially where the kind of intersection functionality I'm looking for already exists...?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这不是两个长度== 2的节点之间的最短路径吗?
在 Neo4j 中,您可以使用 GraphAlgoFactory 中的shortestPath() Finder为此。
Isn't that just the shortest paths between the two nodes with length == 2 ?
In Neo4j you can use the shortestPath() Finder from the GraphAlgoFactory for that.
这会告诉你是否存在联系:
这会告诉你谁是共同的朋友:
这段代码有点粗糙,用 Cypher 更容易表达(取自 Neo4J Server 控制台中的 Cheet Sheet(这是一种很好的方法)填充数据库后使用 Neo4J):
这将为您提供在其他断开连接的节点之间共享的节点列表,您可以通过 CypherParser 类将此查询传递给嵌入式服务器。
This would tell you if there is a connection:
This would tell you who are the common friends are:
This code is a little rough and is much easier to express in Cypher (taken from the Cheet Sheet in the Neo4J Server console (great way to play with Neo4J after you populate a database):
This will give you a list of the nodes shared between to otherwise disconnected nodes. You can pass this query to an embedded server thought the CypherParser class.