0
我使用此代码获得节点a
和b
之间包含两个或更少关系的路径RT
。Neo4j。创建约束来计算具有类型“RT”的关系?
MATCH (a:Tes1 { title: "a" }),(b:Tes1 { title: "b" }), p=shortestPath((a)-[r:BT|RT*]-(b))
WITH count(type(r)='RT') as cnt
WHERE cnt < 3
RETURN p;
错误:
Type mismatch: expected Relationship but was List (line 2, column 17 (offset: 111)) "WITH count(type(r)='RT') as cnt"
我知道这个错误的手段,但我不知道另一种方式。 请帮助