vid设计有哪些好的方案?

本帖问题来源于微信群:NebulaGraph 交流群 Pluto,进群请点击 这里

liuming:请问vid设计有什么好的方案吗?

wei:如果是 one vertex – one tag 的方式,没有天然的全局 id 可以用 prefix+数字 id。

p_1234566 → tag person
t_12323232 → tag team
或者用 prefix + 其他字段拼接。

liuming:拼接就要用 fixstring,但是想用 int。

wei:可以的,自己 hash 一下,也可以用内核上的 hash 实现

yield hash(“u_123”)

±---------------------+
| hash(“u_123”) |
±---------------------+
| -6118459199106456998 |
±---------------------+

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。