在单个cypherQuery Neo4j中进行多节点搜索

时间:2016-03-05 10:34:35

标签: neo4j

我想在Neo4j的单个cyperQuery语句中执行多节点,如.NET中无效的cyperQuery语句所示

string cypherQuery = String.Format(@" 
    START r=node:node_auto_index(""name:(*{0}*)""),
          re=node:node_auto_index(""name:(*{0}*)""),
          d=node:node_auto_index(""name:(*{0}*)"") 
    MATCH (o:Origin{name:{OriginatedFromOrigin}})<-[:ORIGINATED_FROM]-(d:Domain)
          -[:HAS_ROLE]->(r:Role)
          -[rel:HAS_RESPONSIBILITY]->(re:Responsibility),
         (resOriginatedFromOrigin:Origin{name:{OriginatedFromOrigin}})
            <-[:ORIGINATED_FROM]-(re:Responsibility) 
     RETURN ID(r) AS RID, r.name AS RName, ID(re) AS ResID,
            rel.weightinrole AS WeightInRole,
            rel.percenttimeinrole AS PercentTimeInRole,re.name AS ResName,
            re.description AS ResDesc,
            ID(resOriginatedFromOrigin) AS ResOriginatedFromOriginID,               
            resOriginatedFromOrigin.name AS ResOriginatedFromOrigin ",

     request.SearchText);

任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:0)

实际问题是什么?

如果你是初学者,你应该首先更新到最近的Neo4j版本。起始条款来自Neo4j 1.9,就像3岁一样。

您可以使用Neo4jClient或Cypher.NET客户端将Cypher查询发送到Neo4j。

答案 1 :(得分:0)

感谢&#39; s,Michale Hunger,去最新版本的Neo4j解决了我的问题。