Titan+Cassandra and String Vertex Ids

霸气de小男生 提交于 2019-12-11 04:11:13

问题


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.


回答1:


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.

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

The (64 bit) vertex id (which Titan uniquely assigns to every vertex) is the key which points to the row containing the vertex’s adjacency list.




回答2:


No, String identifiers are not supported in the StandardTitanGraph.features(). You could consider using an indexed String property as an alternative.



来源:https://stackoverflow.com/questions/38229312/titancassandra-and-string-vertex-ids

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!