neo4j

neo4j batchimporter is slow with big IDs

▼魔方 西西 提交于 2019-12-11 04:58:08
问题 i want to import csv-Files with about 40 million lines into neo4j. For this i try to use the "batchimporter" from https://github.com/jexp/batch-import. Maybe it's a problem that i provide own IDs. This is the example nodes.csv i:id l:label 315041100 Person 201215100 Person 315041200 Person rels.csv : start end type relart 315041100 201215100 HAS_RELATION 30006 315041200 315041100 HAS_RELATION 30006 the content of batch.properties: use_memory_mapped_buffers=true neostore.nodestore.db.mapped

Load Neo4J in memory on demand for heavy computations

烈酒焚心 提交于 2019-12-11 04:48:41
问题 How could I load Neo4J into memory on demand? On different stages of my long running jobs I'm persisting nodes and relationships to Neo4J. So Neo4J should be on disk, since it may consume too much memory and I don't know when I gonna run read queries against it. But at some point (only once) I will want to run pretty heavy read query against my Neo4J server, and it have very poor performance (hours). As a solution I want to load all Neo4J to RAM for better performance. What is the best option

Is there a Neo4j test harness that uses the JUnit 5 Extension Model?

筅森魡賤 提交于 2019-12-11 04:46:22
问题 In writing test cases for Neo4j I would like to move onto using just the JUnit 5 Extension Model and not use org.junit.vintage or junit-jupiter-migrationsupport . Currently I can only find the Neo4j test-harness for JUnit 4 which uses TestRule and is dependent on org.junit.vintage and junit-jupiter-migrationsupport . Is there a Neo4j test harness for JUnit 5 that uses the Extension Model? References: Neo4j: Home, GitHub Neo4j test-harness : Maven, GitHub, pom.xml JUnit 4: GitHub JUnit 4

How to do aggregate functions for multiple columns using cypher query in Neo4j

大兔子大兔子 提交于 2019-12-11 04:43:37
问题 I have 2 nodes created in graph database, origin airport and destination airport. It is related by a property named 'delayed_by'. MATCH (origin:origin_airport {name: row.ORIGIN}), (destination:dest_airport {name: row.DEST}) CREATE (origin)-[:delayed_by {carr_delay: row.carr_delay}]->(destination) CREATE (origin)-[:delayed_by {weather_delay: row.weather_delay}]-> (destination) CREATE (origin)-[:delayed_by {nas_delay: row.nas_delay}]->(destination) delayed_by holds the value delays caused due

Neo4j SET (update) node properties error

给你一囗甜甜゛ 提交于 2019-12-11 04:43:20
问题 I'm trying to SET (update) a Neo4j using JavaScript. I'm using the JavaScript language drivers. My code executes but the node properties do not update. Here is my code: return session.run("MATCH (a:Person) WHERE a.ID = {id} SET a.name = {name}, a.email = {email}", { id: 114, name: name, email: email }); 回答1: Javascript numbers are 32 bit, Neo4j's are 64 bit, there's some conversion you'll need to perform when setting or retrieving numeric data. Here's the relevant section on this in the

Cypher foreach does not appear to iterate over collection when creating unique

大城市里の小女人 提交于 2019-12-11 04:28:06
问题 For the following query: START n=node(1) MATCH (n)-[:KNOWS]->(k), (n)-[:LOVES]->(l) WITH collect(k) + collect(l) as friends, n FOREACH(f in friends : create unique (n)-[:FRIEND]->(f)) (Data is as on console.neo4j.org) I expect that friends are Morpheus and Trinity so a new FRIEND relation is created from Neo to Morpheus and Neo to Trinity. However, on executing the query, there is only one relation created (Neo-[:FRIEND]->Morpheus). Execute the query again and the other relation is created

NullPointer using apoc.map.fromPairs in Neo4j Cypher Query

北城余情 提交于 2019-12-11 04:27:09
问题 I am using the code below to return all nodes that are 3 inward facing edges from a specific node (id(65)) and format the result as JSON Graph with the help of the apoc.map.fromPairs procedure. I am getting an error if there are no nodes that are 3 edges away from the starting node. It seems that the apoc.map.fromPairs procedure throws the belowerror running against the "null" used for missing parts of the pattern when I include the OPTIONAL statement. Failed to invoke function apoc.map

Inherit properties from a node with relationship to another node to its child in neo4j

巧了我就是萌 提交于 2019-12-11 04:27:01
问题 Inherit properties from all the parents. Consider I have a graph with below format. I want the properties of a node (which will be in account node, if it has a relation) to be inherited by its child node. Assume Parent and child node relationship is maintained by [r:CHILD] and account information by [r2:ACCOUNT]. If node has more than one parent, it needs to inherit from all its parent with the first account : (a0:ACCOUNT)<-[:HAS_ACCOUNT]-Morpheus \ (a1:ACCOUNT)<-[:HAS_ACCOUNT]-Neo \ alpha \

neo4j v2.0.0-M3 REST API batch insert

爷,独闯天下 提交于 2019-12-11 04:23:40
问题 I use batch insert for adding nodes using the RESY API I know how to do this before 2.0, but now I'm starting to use the labeled nodes, and I cant get it to work. I don't find how I can add the label to the node. The documentation is not very clear (to me). http://docs.neo4j.org/chunked/2.0.0-M03/rest-api-node-labels.html This is the json that send to the API: Test1: [{"method":"POST", "to":"/node", "body":{"name":"A"},"id":0}, {"method":"POST", "to":"{0}/labels", "body":{"label":"user"} }]

Can I specify multiple labels in a uniqueness contraint?

試著忘記壹切 提交于 2019-12-11 04:18:22
问题 I am going to experiment with creating a uniqueness constraint on objects in my graph with two labels and am wondering if I can expect it to work. I want to do something like this... CREATE CONSTRAINT ON (n:Object:Sub_graph_A) ASSERT n.name is unique; CREATE CONSTRAINT ON (n:Object:Sub_graph_B) ASSERT n.name is unique; The same object can exist with the same name in the overall graph but must be unique in a particular sub-graph. Any thoughts on whether this is a good idea or not? I should