简体   繁体   English

START Cypher查询关系查找

[英]START Cypher query relationship lookup

I have a Cypher Neo4J query of the following kind: 我有以下一种Cypher Neo4J查询:

START rel=relationship:relationship_auto_index(user="9d6e7140-f3c3-11e3-927f-1f5ca4210ac7") 
RETURN rel;

Do you know know how I filter to return only the rels that have :TO label? 您知道我如何过滤以仅返回具有:TO标签的rels吗? I know I could do it otherwise, but I need to use legacy indexing and want to filter through the relationships I got. 我知道我可以用其他方式做到这一点,但是我需要使用旧索引,并希望通过获得的关系进行过滤。 Thanks! 谢谢!

Cypher has a TYPE function: Cypher具有TYPE函数:

START rel=relationship:relationship_auto_index(user="9d6e7140-f3c3-11e3-927f-1f5ca4210ac7") 
WHERE TYPE(rel)='TO'
RETURN rel;

Be aware to omit the colon in front of TO as it's not part of the relationship type itself. 注意,不要在TO前面省略冒号,因为它不是关系类型本身的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM