neo4j

Cypher query vs cypher dsl in spring data neo4j

╄→尐↘猪︶ㄣ 提交于 2020-01-16 19:18:08
问题 I want to know about neo4j dsl recommendation in Spring data neo4j framework. As of now I used to create repository interface extending from GraphRepository , NamedIndexRepository etc. and write my custom methods with my custom cypher query with @Query annotation as below: @Query(value="START root=node:__types__(className='com.data.EntityNode') WHERE root.id={0} and " + "root.type={1} return root") T findByIdAndType(String id, String type); above method works nicely as far as I consider the

neo4j fails indexing, property size is too long

帅比萌擦擦* 提交于 2020-01-16 18:00:32
问题 neo4j3.4 using lucene_native-2.0 fails to create a constraint for a property. apparently it's because a record is too long Caused by: java.io.IOException: java.lang.IllegalArgumentException: Max supported key size is 4095, but tried to store key of size 4239 | GB+Tree[file:/var/lib/neo4j/data/databases/graph.db/schema/index/lucene_native-2.0/79/string-1.0/index-79, layout:StringLayout[version:0.1, identifier:24016946018123776], generation:2/4] it seems to be this problem https://github.com

Weird Neo4J Cypher behavior on setting relationship properties

白昼怎懂夜的黑 提交于 2020-01-16 16:11:11
问题 I have a Cypher request for Neo4J of this kind: MATCH (u:User {uid: $userId}) UNWIND $contextNames as contextName MERGE (context:Context {name:contextName.name,by:u.uid,uid:contextName.uid}) ON CREATE SET context.timestamp=$timestamp MERGE (context)-[by:BY]->(u) SET by.timestamp = $timestamp My params are: { "userId": "15229100-b20e-11e3-80d3-6150cb20a1b9", "contextNames": [ { "uid": "822e2580-1f5e-11e9-9ed0-5b93e8900a78", "name": "fnas" } ], "timestamp": "1912811921129" } That query above

Reset web interface password on Neo4j EC2 instance

那年仲夏 提交于 2020-01-16 13:23:45
问题 I set up Neo4j on an EC2 instance using this http://www.neo4j.org/develop/ec2 I have the SSH key so I can SSH into the instance, but I don't remember the password I set up for the web interface. I believe this is a Jetty basicauth equivalent, but I'm not sure, nor could I find the config files that might lead me to the right place. How can I reset this password? 回答1: `neo4j-server.properties´ has a setting for the auth-extension being used by the puppet script: org.neo4j.server.credentials=

Is there sth like `eval` in Neo4j?

爷,独闯天下 提交于 2020-01-16 09:05:33
问题 Can I evaluate cypher code from a string in Neo4j? I think about something like eval function in JavaScript. 回答1: You will be helped by the apoc library with a rich set of tools to execute the cypher from the string: call db.labels() yield label call apoc.cypher.run("match (:`"+label+"`) return count(*) as count", null) yield value return label, value.count as count 来源: https://stackoverflow.com/questions/55433173/is-there-sth-like-eval-in-neo4j

Is neoj4 2.2.2 supporting java 8?, error on neo4j/bin/utils script

混江龙づ霸主 提交于 2020-01-16 08:53:10
问题 We are testing neo4j 2.2.2 with java 8u45 but we are seeing an error when we start neo4j. ERROR! Neo4j cannot be started using java version 1.8.0_45. * Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from: http://www.oracle.com/technetwork/java/javase/downloads/index.html * Please see http://docs.neo4j.org/ for Neo4j Server installation instructions. Still the database starts, so the question is: Is this Error message a bug or we should revert the java 8

Neo4J cypher: remove loops from flattened resultset

回眸只為那壹抹淺笑 提交于 2020-01-16 08:35:33
问题 This is an extension of the following question: I have a data lineage related graph in Neo4J with variable length path containing intermediate nodes (tables) as an array: match p=(s)-[r:airflow_loads_to*]->(t) where s.database_name='hive' and s.schema_name='test' and s.name="source_table" return s.name, [n in nodes(p) | n.name] as arrayOfName,t.name Now, this resultset contains loops that I want to omit . I can ' remove ' these loops without the flattening ArrayOfName result by running: match

Neo4j: GraphDatabaseService.registerTransactionEventHandler() does not seem to work

牧云@^-^@ 提交于 2020-01-16 07:25:13
问题 Regarding my previous question: I have a problem with GraphDatabaseService.registerTransactionEventHandler() . When I try to run this test against this handler, I don't get any calls to the beforeCommit method when running 1.9.2 and only once for a new database for 2.0.0-M03, and for that TransactionData.createdNodes() returns an empty iterator even though a a node has been created. The test fails with org.neo4j.kernel.api.exceptions.PropertyKeyNotFoundException: Property key 'uuid' not found

Best practice for unique IDs in Neo4J and other databases?

天涯浪子 提交于 2020-01-16 01:18:06
问题 Currently in my Node.Js app running on Neo4J I use node-uuid module for giving unique IDs to my database objects. Using uuid.v1() function from that module I get something like 81a0b3d0-e4d0-11e3-ac56-73f5c88681be Now, my requests are quite long, sometimes hundreds of nodes and edges in one query. So you can imagine they become huge, because every node and edge has to have a unique ID. Do you know if I could use a shorter ID system in order to not run into any problems after the number of my

Creating relationships between nodes with WHERE clause and using ID in Neo4j

こ雲淡風輕ζ 提交于 2020-01-15 19:17:17
问题 I have two nodes named Room(4) and Houses(4). They have been created in the following way: CREATE (n:Room { code: 1}) CREATE (n:Room { code: 1}) CREATE (n:Room { code: 1}) CREATE (n:Room { code: 1}) CREATE (n:House { code: 1}) CREATE (n:House { code: 2}) CREATE (n:House { code: 3}) CREATE (n:House { code: 4}) These are some of the relations that i am trying to create between the nodes MATCH (room:Room), (house:House{code:1}) WHERE id(room) = 40 CREATE UNIQUE (room)-[:PLACED_IN]->(house) ;