neo4j

Why does Neo4j OGM with Spring Boot 2.0.0.M4 apparently require the embedded driver?

自作多情 提交于 2019-12-11 14:26:50
问题 I have been trialling Spring Boot 2 (2.0.0.M4 at this stage) with the latest Spring Data Neo4j (currently 5.0.0.RC3) and can't seem to get it running. I get the following error: org.neo4j.ogm.exception.ConfigurationException: Could not load driver class org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver I don't ask for an embedded driver, nor do I want one. I only want to use the bolt driver, which is already a dependency of spring-data-neo4j. I've published a project to Github that was

Cypher: Travel in several crossed chained list

两盒软妹~` 提交于 2019-12-11 14:14:31
问题 I have a graph with users. In this graph their are also activities (nodes). Each user have a chained list of its activities : (user)-[:NEXT_ACTIVITY*]->(activities) But there is one tricky part : an activity can be owned by 2 users. So I set a property "idUser" in my NEXT_ACTIVITY relation, with the ID of the user. This is how I can find all activities for 1 user. START user=node:users('name:JohnDoe') MATCH (user)-[rel:NEXT_ACTIVITY*]->(activities) WHERE ALL (r in rel WHERE r.idUser = id(user

neo4j how to set the node id other than setproperty

那年仲夏 提交于 2019-12-11 14:13:10
问题 I want to set the node id like 0,1,2,3,.... instead of setProperty(). Node[] newno=new Node[265214]; for(int i=0; i<newno.length; i++){ newno[i]=db.createNode(); System.out.println(newno[i].getId()); } it show the following big id number: 996660 996661 996662 996663 996656 996657 996658 996659 996668 996669 996670 while i want to make node for example the id of newno[i] is just i. for the large data set, if every time call getProperty() it will take a long time for the program. Thanks 回答1:

Cypher query: Get a count grouped by relationship property

社会主义新天地 提交于 2019-12-11 14:10:11
问题 I am new to Neo4j/Cypher and I am having some trouble grouping by relationship properties. Firstly a toy example: CREATE (A1:Worker {ref:"A1"}) CREATE (A2:Worker {ref:"A2"}) CREATE (B1:Worker {ref:"B1"}) CREATE (B2:Worker {ref:"B2"}) CREATE (A1)-[:StreamsTo {type:"stream1"}]->(B1) CREATE (A1)-[:StreamsTo {type:"stream2"}]->(B1) CREATE (A1)-[:StreamsTo {type:"stream1"}]->(B2) CREATE (A1)-[:StreamsTo {type:"stream2"}]->(B2) CREATE (A2)-[:StreamsTo {type:"stream1"}]->(B1) CREATE (A2)-[:StreamsTo

Neo4j: making one JAR package from app with Neo4j libraries (duplication 'META-INF/…' files)

ぐ巨炮叔叔 提交于 2019-12-11 14:04:24
问题 I understand, the source of this issue. I've saw the topic here. And here is some possible solution. But the last one doesn't work for me. Have the problem with making one jar package (with Maven) of my app with Neo4j libraries within. When I use this jar in another project - everything works fine, but when I try to launch web-interface - I get the above mentioned issue. My app throws Exception with next lines: 01:19:49.727 [main] INFO o.e.jetty.server.ServerConnector - Started

How to iterate over a nested json array and change the node properties based on a condition?

戏子无情 提交于 2019-12-11 14:04:05
问题 I want to create new properties for a pre-existing node based on a condition. To be more specific, I want to create a new node property when a node property matches with a property within the nested JSON array. my json structure looks something like this: {"some tasks":[ {"id":1,"name":"John Doe"}, {"id":2,"name":"Jane Doe"} ], "some links":[ {"id":1,"type":"cartoon"} {"id":2,"type":"anime"} ] } I already created nodes with properties from tasks - now I want to iterate over the links part and

Spring Data Neo4j executes wrong query from repositories

空扰寡人 提交于 2019-12-11 13:59:27
问题 As the title, Spring Data Neo4j doesn't execute the right derived queries. Let me clarify the concept with an example. I have the following class @RelationshipEntity public class MashupToMashupSimilarity { private float score; //GETTER AND SETTER } and to access the objects of the class I use a simple repository class public interface MashupToMashupSimilarityRepository extends GraphRepository<MashupToMashupSimilarity> { public Set<MashupToMashupSimilarity> findByScoreGreaterThan(float score);

Neo4j unable to connect to graph database server

[亡魂溺海] 提交于 2019-12-11 13:56:49
问题 I am using an example script to connect to the neo4j server and after that run a query. But I am getting this error: C:\cygwin\lib\python2.7\site-packages\neo4j\v1\session.py:94: UserWarning: Bolt over TLS is only available in Python 2.7.9+ and Python 3.3+ so communications are not secure warn("Bolt over TLS is only available in Python 2.7.9+ and Python 3.3+ " Traceback (most recent call last): File "C:\Users\FTS.fts-gnosis\workspace\hello1\tester.py", line 3, in session = driver.session()

Setting caption of relationships in Neo4j 2.0.0. browser

南笙酒味 提交于 2019-12-11 13:48:17
问题 In Neo4j 2.0.0 browser I'm trying to set styling of relationships using the .grass file. my graph includes relations like //Output :Affects Outcome create (op1)-[:Affects {level:"Strong", direction:"Positive" }]->(oc1) and my .grass file contains relationship.Affects { color: blue; caption : '{type} {level} {direction}'; shaft-width: 2px; font-size: 10px; padding: 3px; text-color-external: #000000; text-color-internal: #FFFFFF; } what I try to achieve is blue arrows (this works) with a

Neo4j - Cypher query for finding neighbourhood graph

…衆ロ難τιáo~ 提交于 2019-12-11 13:38:39
问题 For the below graph... I am struggling to compose a Cypher query that will return me the neighbourhood graph (relationships) of node 1. The neighbourhood graph of 1 includes the nodes connected by the relations I have marked with dotted lines. These are the nodes pointing to 1, pointed at by 1 and all other inter-connections between these nodes. This below query START a=node(15151) MATCH (a)-[r]-(b) RETURN r gives me back the relations between 1 and 2,3,4,5 but I also need the relations