删除 neo4j 1.8 中的所有节点和关系 [英] Delete all nodes and relationships in neo4j 1.8

查看:31
本文介绍了删除 neo4j 1.8 中的所有节点和关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被很多人问过了
对于我的研究,这是之前提出的一些问题

  1. 2.3.0 之前的版本

    匹配 (n)可选匹配 (n)-[r]-()删除 n,r

    文档

    I know this question is asked by many people already
    for my research, here's some questions asked before

    1. How to delete all relationships in neo4j graph?
    2. https://groups.google.com/forum/#!topic/neo4j/lgIaESPgUgE

    But after all, still can't solve our problems,
    we just want to delete "ALL" nodes and "ALL" relationships

    suppose delete "ALL" can see there are left 0 nodes 0 properties and 0 relationships

    This is the screenshot i took after executing the delete "ALL" suggested by forum

    My question still the same, how do delete all nodes and all relationships in neo4j

    解决方案

    As of 2.3.0 and up to 3.3.0

    MATCH (n)
    DETACH DELETE n
    

    Docs

    Pre 2.3.0

    MATCH (n)
    OPTIONAL MATCH (n)-[r]-()
    DELETE n,r
    

    Docs

    这篇关于删除 neo4j 1.8 中的所有节点和关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆