【发布时间】:2014-07-05 15:24:08
【问题描述】:
如何使用 rest cypher 找到模式关系?
我在终端上运行的查询:-
MATCH (n)<-[:DEPENDS_ON*]-(dependent) RETURN n.host as Host,
count(DISTINCTdependent) AS Dependents ORDER BY Dependents DESC 限制 1**
输出是:-
+--------------------+ |主持人 |家属 |
+--------------------+ | “圣” | 20 | +--------------------+
where 作为与 rest 的等效查询:-
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*\"}}";
输出为空(无记录)!!!
任何帮助表示赞赏。
P.S- 当我们在查询中不使用“*”时,一切正常。 IE 两个查询给出相同的结果
【问题讨论】:
标签: rest neo4j cypher neo4jrestclient