代码区项目交易流程

Neo4j subtract elements from a path


I'm trying use this query in Cypher(Neo4):

MATCH p=(n:BP)-[:Selected]-(g:MOL)-[:Selected]-(e:BP) WHERE n.NameExp='Bos_RM' AND e.NameExp='Jac_RM' AND NONE(x IN nodes(p) WHERE x.NameExp='Jac_AGM' OR x.NameExp='Bos_SM') RETURN n,e,g limit 100

That is, I would like exclude some nodes in path(p) that have properties 'Jac_AGM' and 'Jac_SM'. I'm using Neo4j version 2.1.3.

Thanks! Best wishes, R.

According to your query, you have already mentioned the NameExp attrib values for n and e Nodes. So its evident the nodes with the given names that you wish to be not included are among the set of g:MOL labeled nodes which you can be simply eliminated like below...

MATCH p=(n:BP)-[:Selected]-(g:MOL)-[:Selected]-(e:BP) WHERE n.NameExp='Bos_RM' AND e.NameExp='Jac_RM' AND NOT g.NameExp IN ['Jac_AGM','Jac_SM'] RETURN n,e,g limit 100

本文数据库(综合)相关术语:系统安全软件

点击收藏

LAST grep: Analyze Git Logs with the Command Line 基于Azure资源托管标识来访问KeyVault NEXT