解决方案一

I am trying to perform a query to retrieve all paths between two nodes a and b in which all the paths there is a relationship property fulfilled.

I have tried in many ways but I am not able to success.

MATCH p=(o{value:"a"})-[r*]-(x{value:"b"}) where has(r.property) and r.property="foo" return p

relationship part i have changed to [r*..] and many other options but not working

The function shortestpath does not help me because I want not only the shortest but all the possibilities.

Can someone help me or tell me which is the error in the query?

Thank you in advance.

解决方案二

What you're looking for is the ALL predicate on the relationships collection of the path :

MATCH p=(o{value:"a"})-[r*]-(x{value:"b"})
WHERE ALL(x IN rels(p) WHERE x.property = "foo")
RETURN p

And please use labels !

原文地址:https://stackoverflow.com/questions/39287874/neo4j-cypher-all-paths-between-two-nodes-with-a-relationship-property-filter?rq=1

Neo4j/Cypher: All paths between two nodes with a relationship property filter的更多相关文章

  1. Neo4j Cypher语法(三)

    目录 5 函数 5.1 谓词函数 5.2 标量函数 5.3 聚合函数 5.4 列表函数 5.5 数学函数 5.6 字符串函数 5.7 Udf与用户自定义函数 6 模式 6.1 索引 6.2 限制 7 ...

  2. Neo4j Cypher运行示例

    示例来源: Neo4j in Action. 0 准备数据 0.1 node (user1 { name: 'John Johnson', type: 'User', email: 'jsmith@e ...

  3. Neo4j Cypher语法(二)

    目录 4 子句 4.1 CREATE 4.2 MATCH 4.3 Match 4.4 Create match return连用来返回一个关系基础 4.5 Optional_match 4.6 Wit ...

  4. Neo4j Cypher语法(一)

    目录 Cypher手册详解 1 背景 2 唯一性 3 语法 3.1 命名规则 3.2 表达式 3.3 变量与保留关键字 3.4 参数 3.5 操作符 3.6 模式 3.7 列表 Cypher手册详解 ...

  5. Neo4j Cypher查询语言详解

    Cypher介绍 "Cypher"是一个描述性的图形查询语言,允许不必编写图形结构的遍历代码对图形存储有表现力和效率的查询.Cypher还在继续发展和成熟,这也就意味着有可能会出现 ...

  6. Neo4j/cypher学习笔记与学习建议

    简介 本笔记的主要内容是 cypher 查询语言的编写与使用. 笔记主要整理自w3cschool上的neo4j教程以及Neo4j中文网所提供的cypher中文文档,此外还包括少量从其他个人博客与官方手 ...

  7. Neo4J(Cypher语句)初识

    欢迎各路大神临幸寒舍 以下节点标签为people,friend,用户自己也可以设置成其他标签,查询时需要用到标签.这个标签可以类比为关系数据库中的表名 创建节点.关系 创建节点(小明):create ...

  8. Neo4j 修改关系类型 type

    没有直接修改的函数,也不需要,下面代码就可以: MATCH (n:User {name:"foo"})-[r:REL]->(m:User {name:"bar&qu ...

  9. neo4j初次使用学习简单操作-cypher语言使用

    Neo4j 使用cypher语言进行操作 Cypher语言是在学习Neo4j时用到数据库操作语言(DML),涵盖对图数据的增删改查  neo4j数据库简单除暴理解的概念: Neo4j中不存在表的概念, ...

随机推荐

  1. 3.开始使用Spring Cloud实战微服务

                     开始使用Spring Cloud实战微服务 3.1. Spring Cloud实战前提 3.1.1. 需要的技术储备 语言方面:可以使用Java.scala.Groo ...

  2. Java中的基本数据类型和引用类型

    一.基本数据类型: byte:Java中最小的数据类型,在内存中占8位(bit),即1个字节,取值范围-128~127,默认值0 short:短整型,在内存中占16位,即2个字节,取值范围-32768 ...

  3. vue-cli脚手架构建了项目,想去除Eslint验证,如何设置?

    vue-cli脚手架构建了项目,想去除Eslint验证,如何设置? 在webpack.base.conf.js里面删掉下面: preLoaders: [ { test: /\.vue$/, loade ...

  4. Appium+Robotframework实现iOS应用的自动化测试

    Appium+Robotframework实现iOS应用的自动化测试 连接地址: 地址:https://blog.csdn.net/wd168/article/month/2016/06 1.http ...

  5. SQL Server批量备份数据库

    --批量备份数据库201911 --开启文件夹权限 GO SP_CONFIGURE RECONFIGURE GO SP_CONFIGURE RECONFIGURE GO DECLARE ), ), ) ...

  6. java源码-LinkedHashMap类设计

    LinkedHashMap 继承于 hashMap LinkedHashMap .Entry 继承 HashMap.Node 继承 Map.Entry类 LinkedHashMap .Entry 该E ...

  7. Mac搭建学习PHP环境

    在sublime text 3中学习PHP,编写PHP代码: 使用的xampp开发环境: 第一步,就是安装xampp,这个没啥可说的,根据自己的系统下载安装就好,我的是OSX;第二步,就是用XAMPP ...

  8. python在shell中环境变量使用

    1.用Python Shell设置或获取环境变量的方法: 设置系统环境变量 os.environ['环境变量名称']='环境变量值' #其中key和value均为string类型 os.putenv( ...

  9. 【URL 的编码、解码】

    工具类 /** * URLEncodeTest.java * weixinTest * * Function: TODO * * ver date author * ───────────────── ...

  10. PJzhang:一道看线索找答案的逻辑题

    猫宁!!! 这道逻辑题,2年前就有打算解决,但是没上心,今天抽空梳理出来了思路,逻辑上可以跑的通,不至于以后慢慢忘了,这道题和数独题基本类似,但是也许更花时间,做这种题最好看着线索列图标,省的不停翻页 ...