解决方案一

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. beautifulsoup 安装

    pip install beautifulsoup4

  2. 记一次zipkin和spring cloud bus冲突

    问题表现spring boot 版本 2.0.6spring cloud 版本 Finchley.SR2 使用spring-cloud-starter-zipkin + 独立部署的zipkin 进行链 ...

  3. flask 第五篇

    需求: 1. 用户名: oldboy 密码: oldboy123 2. 用户登录成功之后跳转到列表页面 3. 失败有消息提示,重新登录 4.点击学生名称之后,可以看到学生的详细信息 后端: from ...

  4. 苹果应用(.ipa)打包和上传,不用通过苹果商店即可用

    签名工具: appuploader(.p12:.cer) 打包平台: http://www.lbuilder.com(收费) 上传平台: http://www.58apk.com (每日50次下载,加 ...

  5. Cortex-M3 异常返回值EXC_RETURN

    [EXC_RETURN] 在进入异常服务程序后,硬件自动更新LR的值为特殊的EXC_RETURN.当程序从异常服务程序返回,把这个EXC_RETURN值送往PC时,就会启动处理器的异常中断返回序列.因 ...

  6. 代码实现将键盘录入的数据拷贝到当前项目下的text.txt文件中,键盘录入数据当遇到quit时就退出

    package com.looaderman.test; import java.io.FileNotFoundException; import java.io.FileOutputStream; ...

  7. numpy之填充为nan的数据为该列平均值

    # coding=utf-8 import numpy as np ''' 填充nan的数据,为该列的平均值 ''' def fill_ndarray(t1): for i in range(t1.s ...

  8. php中应用memcached

    PHP连接Memcached 先安装php的memcache扩展 # wget  http://ip/data/attachment/forum/memcache-2.2.3.tgz# tar zxf ...

  9. 007. Reverse Integer

    题目链接:https://leetcode.com/problems/reverse-integer/description/ Given a 32-bit signed integer, rever ...

  10. springboot 多线程的使用

    int pageSize = 10000; int totalCount = doctorDAO.selectDatasByMapCount2(jsonArray, false, null); int ...