neo4j

Cypher: Get info from deleted relationships

会有一股神秘感。 提交于 2019-12-10 10:44:28
问题 MATCH (n:Topic { mongoId: {_id} })-[r]-() DELETE n,r RETURN r; That returns the error 'Error: Relationship 1509 has been deleted'. However, I need r.mongoId to delete entries in another database. How do I do this with Neo4j 2.2.3? I'm doing this through the Seraph library. Is there a way to collect a property, delete the relationships, and return the collection? I just need this data: MATCH (n:Topic { mongoId: _id })-[r]-() RETURN COLLECT(r.mongoId); Thanks! 回答1: You can use a WITH clause to

How to connect Neo4j JDBC driver with DbVisualizer

本秂侑毒 提交于 2019-12-10 10:43:58
问题 I am running Neo4j 2.1.6, tried Neo4j 2.20 as well. I can not connect it with DbVisualizer 9.1.13 And I can not find ANY step by step clear explanation on how to do it. First I've got binary JDBC Neo4j-2.0.1-SNAPSHOT here I can run my just installed Neo4j instance from the browser localhost:7474 and I don't know what the REST API is all about and if it is turned on by default. I can run the Neo4j 2.20 same way that comes with a new feature of user authorization and I am not sure if that JDBC

Error when using export-graphml in Neo4j 2.2

天涯浪子 提交于 2019-12-10 10:40:21
问题 I am trying to use the export-graphml function in Neo4j 2.2. I have downloaded neo4j shell tools and extract it into the lib directory. I am able to export the entire database as a graphml file. However, if I try to export a subset using a query, I receive the following error: Error occurred in server thread; nested exception is: java.lang.NoSuchMethodError: org.neo4j.cypher.export.CypherResultSubGraph.from(Lorg/neo4j/cypher/javacompat/ExecutionResult;Lorg/neo4j/graphdb/GraphDatabaseService;Z

Neo4j安装过程详解

孤街浪徒 提交于 2019-12-10 10:39:20
在安装neo4j之前,需要安装Java JRE,并配置Java开发环境,然后安装neo4j服务。 一、CentOS下安装 1.下载Neo4j 去官网下载最新的neo4j,选择社区版。地址:https://neo4j.com/download/other-releases/#releases 将本地下载好的Neo4j压缩包上传至CentOS服务器,命令:scp neo4j-community-3.5.13-unix.tar.gz root@服务器ip:/usr/local。(或者用其他方法上传) 2.解压 将上传的neo4j压缩包解压,命令:tar -xzvf neo4j-community-3.5.13-unix.tar.gz 若在解压过程中遇到了如下问题: 这说明压缩包出现了问题,没有下载完整,重新下载之后解决。 3.启动 解压成功之后再Neo4j目录下启动,进入Neo4j目录下,启动命令:./bin/neo4j console 如果得到以下信息,说明是java版本过低,Neo4j官方要求jdk1.8 ERROR: Unable to find Java executable. * Please use Oracle(R) Java(TM) 8, OpenJDK(TM) or IBM J9 to run Neo4j. * Please see https://neo4j.com

How to combine cypher queries into a transaction in Py2neo v3

别来无恙 提交于 2019-12-10 10:23:24
问题 In py2neo v2.0, it was possible to use a transaction to execute Cypher statements: tx=graph.cypher.begin() tx.append("MERGE (n:Process {proc_nm : {proc_nm}}) ON CREATE SET n.count = 1 ON MATCH SET n.count = n.count +1", {proc_nm : 'wibble'}) tx.commit When processing complex files this allows very fast updates to be made to the Neo4J database. In py2neo v3.0 the syntax has changed to: graph.run(("MERGE (n:Process {proc_nm : {proc_nm}}) ON CREATE SET n.count = 1 ON MATCH SET n.count = n.count

REST API GET/POST using jquery AJAX to get node using neo4j graph database

狂风中的少年 提交于 2019-12-10 10:19:17
问题 I'm new to REST API**(is that really my REST problem?)** I want to get all node from neo4js by using Cypher START n = node(*) return n; how do i use if i use jquery ajax POST or GET method in doc it recommend POST http://localhost:7474/db/data/cypher Accept: application/json Content-Type: application/json In my code i write $.ajax({ type:"POST", url: "http://localhost:7474/db/data/cypher", accepts: "application/json", dataType:"json", contentType:"application/json", data:{ "query" : "start n

Proper way to update Edges in Bulbs (neo4j or titan)

北慕城南 提交于 2019-12-10 10:18:16
问题 I'm experimenting with Bulbs to interface with a graph database. ( Production will use Titan, locally Neo4j seems best for experimenting ). I can't wrap my head around this concept... Bulbs shows how to create new Vertices... >>> james = g.vertices.create(name="James") >>> julie = g.vertices.create(name="Julie") >>> g.edges.create(james, "knows", julie) Digging into the docs, I can replace that with a "get or create" as well : >>> james = g.vertices.get_or_create('name',"James",{'name':'james

Neo4j Python py2neo authorization error

若如初见. 提交于 2019-12-10 10:16:02
问题 Installed Neo4j 2.2.3 on Windows 8.1. Nothing special. Started the server through the Neo4j start app. Nothing special Started working with py2neo as in the documentation on Neo4j.org. Ran into an authorization error I cannot explain. Log follows below. One special remark: in spite of python\script being in the path the python shell will only start from C:\python34\python. Please explain what I'm doing wrong and can improve. The Log: Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft

Error in Executing Neo4j Cypher Query (by Java) embedded mode

*爱你&永不变心* 提交于 2019-12-10 10:13:30
问题 Im having error in executing Cypher query in java (embedded mode) This is my code: import org.neo4j.cypher.internal.ExecutionEngine; import org.neo4j.cypher.internal.ExecutionResult; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.factory.GraphDatabaseFactory; public class test { public static void main(String[] args) { GraphDatabaseFactory graphdbFactory = new GraphDatabaseFactory(); GraphDatabaseService graphdb = new graphdbFactory.newEmbeddedDatabase("C:/Users/dell

How to get nodes that have a given amount of outgoing relationships with a given property in Neo4j Cypher?

流过昼夜 提交于 2019-12-10 10:00:20
问题 In my domain a node can have several relationships of the same type to other entities. Each relationship have several properties and I'd like to retrieve the nodes that are connected by at least 2 relationships that present a given property. EG: A relationship between nodes have a property year . How do I find the nodes that have at least two outgoing relationships with the year set to 2012 ? Why Chypher query so far looks like this (syntax error) START x = node(*) MATCH x-[r:RELATIONSHIP