标签动态获取的查询无法支持变量的两次使用,请问有没有其它类似的查询?不用UNION连接~
5 回复
@graphway // 无法返回结果 CALL db.labels() YIELD label CALL apoc.cypher.run(“MATCH P=(n:LinkedinID)-[]-(f:
"+label+"
)-[]-(g:"+label+"
)-[]-(h)-[]-(m:LinkedinID) WHERE n.name CONTAINS {a} AND m.name CONTAINS {b} RETURN P”,{a:‘Perry’,b:‘Jenny Perron’}) YIELD value RETURN value.p // 可以返回结果 MATCH P=(n:LinkedinID)-[]-(f:LinkedinID)-[]-(g:组织)-[]-(h)-[]-(m:LinkedinID) WHERE n.name CONTAINS ‘Perry’ AND m.name CONTAINS ‘Jenny Perron’ RETURN P
你在APOC的调用中用了2次label变量,在你下面的Cypher中只有一次啊: MATCH P=(n:LinkedinID)-[]-(f:LinkedinID)-[]-(g:组织)-[]-(h)-[]-(m:LinkedinID) WHERE …