neo4j

spring data neo4j version issue

本秂侑毒 提交于 2019-12-12 04:05:43
问题 I am trying to use spring-data-neo4j in my grails project but there are so many version conflicting. I am using following dependency compile org.springframework.data:spring-data-neo4j-rest:3.1.2.RELEASE then if i run my neo4j server 2.1.2 then it is giving me error Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jMappingContext' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Invocation of init method failed;

Neo4j Embedded Mode with Password

天涯浪子 提交于 2019-12-12 03:54:48
问题 Can you connect to Neo4j in embedded mode in a Java application to connect to an existing running Neo4J server that requires a username and password? How do you do that? Apparently without authentication it is: graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH ); registerShutdownHook( graphDb ); 回答1: Http authentication is part of the Neo4j server component. The code snippet that you're using runs an embedded database instance. Please clarify your question if a) you want some

neo4j community V1.9.4 - how to configure IP address and default database location?

…衆ロ難τιáo~ 提交于 2019-12-12 03:54:36
问题 Just installed Neo4j community v1.9.4 - thanks for Windows Desktop Launcher. A couple of configuration questions: 1) How can I set the webserver to listen to any connection? In the previous versions I could set the webserver to listen on 0.0.0.0; With the new version, the properties file (neo4j-server.properties) doesn't appear any longer. 2) From the desktop launcher, is it possible to change the default database starting location? I am working with a previously created database and have to

How can we copy labels from one node to another in one cypher?

旧巷老猫 提交于 2019-12-12 03:53:50
问题 The question is just as the title, and the cypher statement is just like the follow: Match (n: test) CREATE (copy : LABELS(n)) set copy = n Its purpose is to create a node with the same properties and same labels as the other node, but it doesn't work now because we cannot use a expression like LABELS(n) to set lobel to a node. How can I make it work? 回答1: Unfortunately, labels currently cannot be set directly from data values. 回答2: You could get the node's properties and labels you want to

How do I import Python node dicts into neo4j?

二次信任 提交于 2019-12-12 03:52:15
问题 I produce the following node and relationship data in a for loop about 1 million times. The idea is that investor nodes connect to company nodes by relationship edges: investor = {'name': owner['name'], 'CIK': owner['CIK']} relationship = {'isDirector': owner['isDirector'], 'isOfficer': owner['isOfficer'], 'isOther': owner['isOther'], 'isTenPercentOwner': owner['isTenPercentOwner'], 'title': owner['title']} company = {'Name': json['issuerName'], 'SIC': json['issuerSIC'], 'Ticker Symbol': json

Neo4J: shortest paths with specific relation types sequence constrain

╄→尐↘猪︶ㄣ 提交于 2019-12-12 03:48:59
问题 I need to find shortest paths between nodes, but with some restrictions on relations types in good paths. I have two relation types: A & B. Path is considered bad if it has two or more consecutive relation of type B: Good path: ()-A->()-A->()<-A-()-B->()-A->()-B->() Bad path: ()-A->()-A->()<-A-() -B->()<-B- ()-A->() The Cypher query: MATCH path=allShortestPaths( (p:P{idp:123})-[rel:A|B*]-(p2:P{idp:124}) ) WHERE *some-predicate-on-path-or-rel* RETURN path is not a solution because the shortest

How to enumerate nodes and relationships along path returned via Cypher

戏子无情 提交于 2019-12-12 03:46:42
问题 I opened this question here: How to find specific subgraph in Neo4j using where clause to find a path of a certain criteria. Yet when I try to do things like get the relationship type I cannot. For example I tried MATCH p = (n:Root)-[rs1*]->() WHERE ALL(rel in rs1 WHERE rel.relevance is null) RETURN nodes(p), TYPE(relationships(p)) But I get the error: Type mismatch: expected Relationship but was Collection<Relationship> I think I need to use a WITH clause but not sure. Similarly I wanted the

Running parametrized neo4j cypher query

╄→гoц情女王★ 提交于 2019-12-12 03:46:27
问题 Given below is the cypher query which gets repeated for each relationship type as mentioned in parameterized list and each relationship type has specific property and value to be added to the connecting node. According the neo4j, it is not possible to parametrize relationship type. Is there anyway to address this using cypher? or with apoc? Merge(n_device: Device{identifier: {deviceId}}) ON CREATE SET n_device.created=timestamp() WITH n_device OPTIONAL MATCH (n_device)-[r_prev:{deviceRel}

Neo4j CSV import being too slow

半腔热情 提交于 2019-12-12 03:39:14
问题 I know this question has been asked several times but none of the answers solved my problem. I am using the following query to import the data: USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM 'file:///C:/Users/Zo5/Documents/Neo4j/check/import/result1.csv' AS line1 MERGE (p:Person {forename:line1.forename, surname:line1.surname, nationality:line1.nationality, occupation:line1.occupation, title:line1.title}) but the process is too slow. The CSV file is about 700MB. It takes about 15 minutes

How to use neo4j bolt session/transaction in a procedure as plugin for neo4j server extension?

爱⌒轻易说出口 提交于 2019-12-12 03:37:29
问题 How to handle multiple session in a single procedure for sample sudo code is presented below? I tried the same code below but for some reason it doesn't work in as plugin, with the neo4j/plugin...really don't know what happens. [BUT WORKS WELL WITH IN ECLIPSE] @Procedure("test.begin") public void begin() throws InterruptedException { Driver driver = GraphDatabase.driver("bolt://localhost/", Config.build().withEncryptionLevel(Config.EncryptionLevel.NONE).toConfig()); Session session = driver