neo4j

Neo4j - How do you do parallel insertion into a linked list via Cypher over REST?

你离开我真会死。 提交于 2019-12-08 02:51:33
问题 I want to create a linked list using Cypher over REST. If I create the head of the list using the following query: MERGE (headNode:HEAD {list:"mylist"}) WITH headNode MERGE headNode-[:LINK]->(headNode) RETURN headNode And then do the insert using this query: MERGE (headNode:HEAD {list:"mylist"})-[old:LINK]->after DELETE old CREATE headNode-[:LINK]->(newNode:LINKNODE { number : {nodeNumber} })-[:LINK]->after Then everything is fine as long as I don't run multiple insert queries in parallel.

Determine Neo4j database version

帅比萌擦擦* 提交于 2019-12-08 02:49:46
问题 The Neo4j Java API automatically updates outdated databases to the current version when I call new GraphDatabaseFactory().newEmbeddedDatabase(File storeDir) I would like to check what version the database is before doing that. Is there a way to do that with the Java API? Or alternatively: Where is the database version stored so I can read it out manually? 回答1: Release version I dug into the Neo4j API source and found an answer. Neo4j reads out the previous version from the debug.log file in

Neo4j partition

喜欢而已 提交于 2019-12-08 02:47:32
问题 Is the a way to physically separate between neo4j partitions? Meaning the following query will go to node1: Match (a:User:Facebook) While this query will go to another node (maybe hosted on docker) Match (b:User:Google) this is the case: i want to store data of several clients under neo4j, hopefully lots of them. now, i'm not sure about whats is the best design for that but it has to fulfill few conditions: no mixed data should be returned from a cypher query ( its really hard to make sure,

Neo4j ImpermanentDatabase in python unittests

瘦欲@ 提交于 2019-12-08 02:25:51
问题 I am trying to create unit tests for a python project that will interface with a Neo4j Graph database. Currently, I am implementing the embedded graph database, but will likely migrate to a REST interface if I choose to deploy this to a web application. I have intstalled v1.9rc2 of the embedded neo4j project, installed via pip on a virtual environment. There are mentionings of a java class org.neo4j.test.TestGraphDatabaseFactory , here, which sounds perfect for what I have in mind. I am

Using Neo4J Spatial Cypher queries with other conditions

懵懂的女人 提交于 2019-12-08 02:22:01
问题 I am using Neo4J Spatial cypher queries to find users in a 25KM radius, and among them find those who have the same hometown as I do. I used the following query: START u=node(5),node=node:geom('withinDistance:[17.3,78.3,25.0]') MATCH (u)-[:hometown]->()<-[:hometown]-(o) RETURN o; This query doesn't work the way I intended. It identifies all user nodes in the given radius and executes the same MATCH query, which is specific to user with node ID 5, for each of those nodes. Splitting this

Unable to create elasticsearch index from neo4j

╄→гoц情女王★ 提交于 2019-12-08 02:17:26
问题 I want to create elastic search indexes on neo4j data. I reffered https://github.com/neo4j-contrib/neo4j-elasticsearch and https://www.youtube.com/watch?v=SJLSFsXgOvA&ab_channel=AnmolAgrawal to create elasticsearch index from neo4j. But after that, im getting below error in neo4j.log file. 2016-11-08 12:20:09.825+0000 WARN Error updating ElasticSearch No Server is assigned to client to connect io.searchbox.client.config.exception.NoServerConfiguredException: No Server is assigned to client to

neo4j : Cannot perform data updates in a transaction that has performed schema updates

☆樱花仙子☆ 提交于 2019-12-08 02:14:57
问题 Hi I am getting following error while saving NodeEntity object by using Neo4jTemplate Cannot perform data updates in a transaction that has performed schema updates Spring-data :- <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>3.1.0.BUILD-SNAPSHOT</version> Neo4j Version : 2.X Service :- @Override @Transactional public void addRepository(Repository repository) { template.save(repository); } Caused by: org.neo4j.kernel.api.exceptions

Neo4j: Filter nodes based on aggregate function

时间秒杀一切 提交于 2019-12-08 01:48:33
问题 Suppose I have a list of customer nodes and a list of orders each customer has placed represented as order nodes associated to these customer nodes. Each order has a cost numeric property associated to it. I want to return those customers, whose average order is greater than a threshold. Here is some non-functioning code that exemplifies what I want: MATCH (n0:Customer)-[]-(n1:Order) WITH n1.cost as cost WHERE avg(cost) > 300 RETURN n0, avg(cost) But of course this is not quite right. How

Testing Neo4j managed extensions

可紊 提交于 2019-12-08 00:46:20
问题 I've written a server extension for Neo4j, following the guidelines at http://neo4j.com/docs/stable/server-plugins.html . I wrote unit tests for some of the internal methods, but I would also like to test the REST interface if possible. http://neo4j.com/docs/stable/_testing_your_extension.html seems to only show how to test unmanaged extensions, but I'm looking for something closely analogous to that for managed extensions. Any pointers? I do know how to load the extension into a server and

Unknown function 'algo.getNodeById'

送分小仙女□ 提交于 2019-12-08 00:10:37
问题 I tried to run the following command in Neo4j however it gives the error Unknown function 'algo.getNodeById'. I am using Neo4j desktop (3.4.0) and I am running this command in Neo4j browser: CALL algo.unionFind.stream('', ':REL', {}) YIELD nodeId,setId RETURN algo.getNodeById(nodeId).id AS user, setId I want to find connected components (top10 maximum connected) in my graph. Any other solution which can help me visualize the connected component in the graph will also work 回答1: Some of the