neo4j

Neo4j crashes on batch import

▼魔方 西西 提交于 2021-02-10 17:50:25
问题 I'm importing nodes that are all part of one Merge and relationship creation statement, but Neo4j is crashing with StackOverflowExceptions or "ERROR (-v for expanded information): Error unmarshaling return header; nested exception is: java.net.SocketException: Software caused connection abort: recv failed" I admit my approach may be faulty, but I have some (A) nodes with ~8000 relationships to nodes of type (B) and (B) nodes have ~ 7000 relationships to other (A) nodes. I basically have a big

SyntaxError: Unexpected token { when compiling my node.js code

谁都会走 提交于 2021-02-10 16:59:14
问题 I'm getting the below error every time with the first 'import' when I trying to run grandstack neo4j graphql api app. PS C:\Users\grand-stack-starter-master\api> nodemon index.js [nodemon] 1.19.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node index.js src/index.js` C:\Users\grand-stack-starter-master\api\src\index.js:1 import { typeDefs } from "./graphql-schema"; ^ SyntaxError: Unexpected token { at Module._compile (internal/modules/cjs/loader.js

SyntaxError: Unexpected token { when compiling my node.js code

眉间皱痕 提交于 2021-02-10 16:59:05
问题 I'm getting the below error every time with the first 'import' when I trying to run grandstack neo4j graphql api app. PS C:\Users\grand-stack-starter-master\api> nodemon index.js [nodemon] 1.19.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node index.js src/index.js` C:\Users\grand-stack-starter-master\api\src\index.js:1 import { typeDefs } from "./graphql-schema"; ^ SyntaxError: Unexpected token { at Module._compile (internal/modules/cjs/loader.js

Neo4j & Spring Data Neo4j 4.0.0 : Importing large datasets

非 Y 不嫁゛ 提交于 2021-02-10 11:53:33
问题 I want to insert real-time logging data into Neo4j 2.2.1 through Spring Data Neo4j 4.0.0. The logging data is very big which may reach hundreds of thousands records. How is the best way to implement this kind of functionality? Is it safe to just using the .save(Iterable) method at the end of all the node entity objects creation? Is there something like batch insertion mechanism in Spring Data Neo4j 4.0.0? Thanks in advance! 回答1: As SDN4 can work with existing databases directly you can use

Graph Layout Algorithm of Neo4j

五迷三道 提交于 2021-02-08 11:57:29
问题 What is the graph layout algorithm that is used in Neo4j? I would like to have the paper that explain the graph layout algorithm that is shown in NEO4J. I wan to know why the nodes are organized in the way Neo4j presents them. 回答1: To visualize a graph in the neo4j-browser is used d3 library. View implementation of d3.layout.force here: layout.ts. 回答2: The layout algorithm used for visualizing graphs in the Neo4j browser is a force directed algorithm. From Wikipedia: Their purpose is to

Neo4J - Merge statement not creating new nodes with a relationship

南笙酒味 提交于 2021-02-08 11:44:15
问题 I have written a query which builds 2 new nodes if it exists then it just updates the properties and added a relationship between them. For the first time when I'm creating the nodes and relationship everything is going fine. // This is the first run MERGE (Kunal:PERSON) ON CREATE SET Kunal.name = 'Kunal', Kunal.type = 'Person', Kunal.created = timestamp() ON MATCH SET Kunal.lastUpdated = timestamp() MERGE (Bangalore: LOC) ON CREATE SET Bangalore.name = 'Bangalore', Bangalore.type = 'Location

Cypher: Shortest Path with Constraint

主宰稳场 提交于 2021-02-08 10:57:15
问题 I want to perform a shortest path query like the following: START source=node:myIndex(name="<src>"), destination=node:myIndex(name = "<dst>") MATCH p = shortestPath(source-[:REL1*..5]-destination), source-[sourceRel:REL1]-m, destination-[destRel:REL1]-k WHERE sourceRel.a=<someValue> and destRel.a=<someOtherValue> RETURN NODES(p); I want to get the shortest path between <src> and <dst> with the constraint that the property a has a certain value on the first relationship from src and dst

Cypher: Shortest Path with Constraint

谁都会走 提交于 2021-02-08 10:56:08
问题 I want to perform a shortest path query like the following: START source=node:myIndex(name="<src>"), destination=node:myIndex(name = "<dst>") MATCH p = shortestPath(source-[:REL1*..5]-destination), source-[sourceRel:REL1]-m, destination-[destRel:REL1]-k WHERE sourceRel.a=<someValue> and destRel.a=<someOtherValue> RETURN NODES(p); I want to get the shortest path between <src> and <dst> with the constraint that the property a has a certain value on the first relationship from src and dst

Modeling concept and its impact on the performance

社会主义新天地 提交于 2021-02-08 10:28:17
问题 I kindly ask to point out the pros and cons of the solutions that I came up with for the challenge described below. Getting into the details of neo4j internals like how things are stored or processed is more than welcome. I would appreciate for referring to the points e.g. U.2 / A.1.A for clear distinction. I have been designing model where we have two types of actors: User and Administrator. User of the system can: U.1) list both valid OR invalid (issued OR revoked) Invitations with

shortest path between 2 nodes through waypoints in neo4j

两盒软妹~` 提交于 2021-02-08 10:12:53
问题 I have a graph in neo4j where a node represents a city and a relationship represents roads connecting the cities. The relationships are weighted and have a property called 'distance'. I want to find the shortest (least weighted path) between two cities A and B. This is easily done using Dijkstra's algorithm. The tricky part is that I have a set of cities which are to be covered in the path from A to B. In other words, the path from A to B should cover all the waypoints, the order doesn't