如何使用 rest cypher 找到模式关系?
我在终端上运行的查询:-
MATCH (n)<-[:DEPENDS_ON*]-(dependent) RETURN n.host as Host,
count(DISTINCTdependent) AS Dependents ORDER BY Dependents DESC LIMIT 1**
输出是: -
+--------------------+ | 主持人 | 家属 |
+--------------------+ | “圣” | 20 | +--------------------+
其中与休息的等效查询:-
String query = "{\"query\" : \"MATCH (website)<-[rel]-(dependent) " +
"WHERE TYPE(rel) = {rtype} RETURN website.host as Host," +
"count(DISTINCT dependent) AS Dependents ORDER BY Dependents DESC LIMIT 1" +
" \", \"params\" : {\"rtype\" : \"DEPENDS_ON*\"}}";
并且输出为空(无记录)!!!
任何帮助表示赞赏。
PS-当我们在查询中不使用“*”时,一切正常。IE 两个查询给出相同的结果