hugegraph自动生成的ID,g.V('ID')无法查询到结果
Expected behavior 期望表现
前提条件:在建立schema时,如标签person schema.vertexLabel("person") .properties("uid","eid", "name", "age", "city") .ifNotExist() .create(); 不设置主键primaryKeys("uid") 数据库自动生成ID值:如——>280390937614483456 期望:通过g.V('280390937614483456')可以查到该点 如设置主键primaryKeys("uid") uid=123456 数据库自动生成ID值:如——>1:123456 通过g.V('1:123456')可以查到该点
Actual behavior 实际表现
数据库自动生成ID值:如——>280390937614483456 实际:通过g.V('280390937614483456')查不到该点 { "id": "5330571c-aa4f-4ac3-85c6-fb3bdf8fbb18", "data": [ ], "type": "EMPTY", "duration": "17", "showNum": 0, "message": "", +"graph": { … } } 疑问:数据库生成ID是唯一性的不?是不是必须在定义schema的时候定义主键才能保证id的唯一性? 如果是唯一性的ID,通过ID查询为什么无法查询到点的结果?
Steps to reproduce the problem 复现步骤
- {step 1}
- {step 2}
- {step 3}
Status of loaded data 数据状态
Vertex/Edge summary 数据量
- loaded vertices amount: {like 10 million}
- loaded edges amount: {like 20 million}
- loaded time: {like 200s}
Vertex/Edge example 数据示例
{type something here...}
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
{type something here...}
Specifications of environment 环境信息
- hugegraph version: {like v0.7.4}
- operating system: {like centos 7.4, 32 CPUs, 64G RAM}
- hugegraph backend: {like cassandra 3.10, cluster with 20 nodes, 3 x 1TB HDD disk each node}
自动生成id时为数字类型,请勿使用引号:
g.V('280390937614483456') => g.V(280390937614483456)