本文介绍了Titan + Cassandra和字符串顶点ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过将 graph.set-vertex-id设置为true,看来我们可以让Titan 1.0使用自定义的长id。有什么方法可以将非长(即字符串)ID用作顶点ID?看到Tinkerpop API支持字符串,并且有一个名为 StringIds的功能,是否可以通过某种方式启用该功能?我正在将Titan与Cassandra一起使用。

It looks like we can get Titan 1.0 use custom long ids by setting "graph.set-vertex-id" to true. Is there some way to use non-long (i.e. String) ids as Vertex Ids? Seeing that the Tinkerpop api supports Strings, and there's a feature called "StringIds", is there some way of enabling that feature? I'm using Titan with Cassandra.

推荐答案

我认为这与Titan的内部结构背道而驰。 Titan开发人员之一建议在使用您自己的索引属性。在和指出应使用唯一的索引属性。

I think this goes against Titan's internal structure. One of the Titan devs recommends here to just use your own indexed property. This is reiterated here and here stating that unique indexed properties should be used.

我认为这样做的原因是内部ID实际上是指系统上的位置。如所述:

I think the reason for this is that the internal ids actually refer to locations on the system. As stated here:

这篇关于Titan + Cassandra和字符串顶点ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 05:33