match根据条件查询获取不到数据


(admin@nebula) [test1]> match (p:player) return p 
+-------------------------------------+
| p                                   |
+-------------------------------------+
| ("13" :player{age: 13, name: "n2"}) |
+-------------------------------------+
| ("15" :player{age: 15, name: "n5"}) |
+-------------------------------------+
| ("11" :player{age: 11, name: "n1"}) |
+-------------------------------------+
| ("14" :player{age: 14, name: "n4"}) |
+-------------------------------------+
Got 4 rows (time spent 3193/3887 us)

Thu, 19 Aug 2021 14:31:03 CST

(admin@nebula) [test1]> INSERT VERTEX player (name, age) VALUES "11":("n1", 11);
Execution succeeded (time spent 1394/2052 us)

Thu, 19 Aug 2021 14:31:14 CST

(admin@nebula) [test1]> 
(admin@nebula) [test1]> INSERT VERTEX player (name, age) VALUES "11":("n1", 1111);
Execution succeeded (time spent 1394/2033 us)

Thu, 19 Aug 2021 14:31:34 CST

(admin@nebula) [test1]> match (p:player) return p 
+---------------------------------------+
| p                                     |
+---------------------------------------+
| ("13" :player{age: 13, name: "n2"})   |
+---------------------------------------+
| ("15" :player{age: 15, name: "n5"})   |
+---------------------------------------+
| ("14" :player{age: 14, name: "n4"})   |
+---------------------------------------+
| ("11" :player{age: 1111, name: "n1"}) |
+---------------------------------------+

(admin@nebula) [test1]>  match (p:player) where p.name=="n2" return p;
+-------------------------------------+
| p                                   |
+-------------------------------------+
| ("13" :player{age: 13, name: "n2"}) |
+-------------------------------------+
Got 1 rows (time spent 3355/4076 us)

Thu, 19 Aug 2021 14:59:22 CST

(admin@nebula) [test1]>  match (p:player) where p.name=="n1" return p;
Empty set (time spent 1793/2393 us)

Thu, 19 Aug 2021 14:59:26 CST

(admin@nebula) [test1]> 
(admin@nebula) [test1]> match (v:player) return v;
+---------------------------------------+
| v                                     |
+---------------------------------------+
| ("14" :player{age: 14, name: "n4"})   |
+---------------------------------------+
| ("11" :player{age: 1111, name: "n1"}) |
+---------------------------------------+
| ("13" :player{age: 13, name: "n2"})   |
+---------------------------------------+
| ("15" :player{age: 15, name: "n5"})   |
+---------------------------------------+

当第二次insert 重复的vid时候,查询不了数据
INSERT VERTEX player (name, age) VALUES “11”:(“n1”, 1111);
match (p:player) where p.name==“n1” return p;

来,补充下必要的 Nebula 版本号信息

2.0.1

2.0.1 我没有复现诶。

(root@nebula) [(none)]> create space test(vid_type=fixed_string(30))
Execution succeeded (time spent 1931/2268 us)

(root@nebula) [(none)]> use test
Execution succeeded (time spent 1588/1881 us)

(root@nebula) [test]> create tag player(age int, name string)
Execution succeeded (time spent 1159/1473 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "11":("n1", 11);
Execution succeeded (time spent 2303/2604 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "13":("n2", 13);
Execution succeeded (time spent 1328/1616 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "15":("n5", 15);
Execution succeeded (time spent 1435/1724 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "14":("n4", 14);
Execution succeeded (time spent 1458/1779 us)

(root@nebula) [test]> create tag index index_name on player(name(8))
Execution succeeded (time spent 1019/1306 us)

(root@nebula) [test]> rebuild tag index index_name
+------------+
| New Job Id |
+------------+
| 4          |
+------------+
Got 1 rows (time spent 1319/1709 us)

(root@nebula) [test]> show jobs
+--------+---------------------+------------+----------------------------+----------------------------+
| Job Id | Command             | Status     | Start Time                 | Stop Time                  |
+--------+---------------------+------------+----------------------------+----------------------------+
| 4      | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-08-30T07:28:52.000000 | 2021-08-30T07:28:52.000000 |
+--------+---------------------+------------+----------------------------+----------------------------+
Got 1 rows (time spent 934/1384 us)

(root@nebula) [test]> match (p:player) return p
+---------------------------------------+
| p                                     |
+---------------------------------------+
| ("13" :player{age: 13, name: "n2"})   |
+---------------------------------------+
| ("15" :player{age: 15, name: "n5"})   |
+---------------------------------------+
| ("11" :player{age: 11, name: "n1"}) |
+---------------------------------------+
| ("14" :player{age: 14, name: "n4"})   |
+---------------------------------------+
Got 4 rows (time spent 3012/4005 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "11":("n1", 11);
Execution succeeded (time spent 2280/2639 us)

(root@nebula) [test]> INSERT VERTEX player (name, age) VALUES "11":("n1", 1111);
Execution succeeded (time spent 1424/1711 us)

(root@nebula) [test]> match (p:player) where p.name=="n2" return p;
+-------------------------------------+
| p                                   |
+-------------------------------------+
| ("13" :player{age: 13, name: "n2"}) |
+-------------------------------------+
Got 1 rows (time spent 4689/5242 us)

(root@nebula) [test]> match (p:player) where p.name=="n1" return p;
+---------------------------------------+
| p                                     |
+---------------------------------------+
| ("11" :player{age: 1111, name: "n1"}) |
+---------------------------------------+
Got 1 rows (time spent 3193/3570 us)

(root@nebula) [test]> match (v:player) return v;
+---------------------------------------+
| v                                     |
+---------------------------------------+
| ("13" :player{age: 13, name: "n2"})   |
+---------------------------------------+
| ("15" :player{age: 15, name: "n5"})   |
+---------------------------------------+
| ("11" :player{age: 1111, name: "n1"}) |
+---------------------------------------+
| ("14" :player{age: 14, name: "n4"})   |
+---------------------------------------+
Got 4 rows (time spent 3069/3462 us)

浙ICP备20010487号