neo4j

Nodes() function returns relationships?

谁都会走 提交于 2019-12-13 18:50:14
问题 I am new to Neo4j. I have installed version 2.2.5 community edition to my machine. Downloaded sample data set cineasts_12k_movies_50k_actors_2.1.6 . Followed the online training, all is good, except one query confused me a little. match p = shortestPath( (kevin {name:"Kevin Bacon"})-[*]-(keanu {name:"Keanu Reeves"}) ) return nodes(p) I was expecting that the returned values would only be the nodes. Reading the manual about nodes() it sounds like it should only return nodes. However I am

neo4j 120 seconds error after copying graph.db permission

杀马特。学长 韩版系。学妹 提交于 2019-12-13 18:24:55
问题 This is my problem. I have copied graph.db for a backup. Neo4j was started when I did that. After that I deleted graph.db and neo4j started a new one. Neo4j is working fine, no problems. But when wanted to copy again graph.db (the backup one) I get: Starting Neo4j Server...WARNING: not changing user waiting for server to be ready... Failed to start within 120 seconds. I have uninstalled and installed again neo4j and it does not work. I think is a problem of permissions... If yes how to solve

How to return all properties of a node with their name and their value using Cypher

北慕城南 提交于 2019-12-13 18:19:26
问题 I saw here : How can I return all properties for a node using Cypher? that somebody already asked this question, but 1 year ago. So i need to ask it now : is there a way, today, to return all properties of a node using cypher? i need to do it for a translation system where previous developpers have created it as 1 node per language, with contains all of the properties with their name in the desired language. I need to get it for a Java application. Example: node FR contains: "Salut_01" :

Can't start neo4j console

一世执手 提交于 2019-12-13 18:15:12
问题 I used to have neo4j on a small hard drive on my machine and I created a new installation on a larger hard drive and now I can't start neo4j console. I can start neo4j shell, but console hangs up after this: WARNING: Max 16384 open files allowed, minimum of 40 000 recommended. See the Neo4j manual. Starting Neo4j Server console-mode... Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf

BatchInserter initialization yields ArrayIndexOutOfBounds and ExceptionInInitializationError

青春壹個敷衍的年華 提交于 2019-12-13 18:04:42
问题 All I'm trying to do is the following: BatchInserter ins = BatchInserters.inserter("target/batchinserter-example"); where "target/batchinserter-example" is a given store directory. It compiles fine, but I get: Exception in thread "main" java.lang.ExceptionInInitializerError at org.neo4j.unsafe.batchinsert.BatchInserterImpl.rejectAutoUpgrade(BatchInserterImpl.java:556) at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:219) at org.neo4j.unsafe.batchinsert

Optimize Neo4j Cypher path finding with limited paths in an undirected graph

一世执手 提交于 2019-12-13 17:23:31
问题 As a follow-up from the question "Neo4j Cypher path finding slow in undirected graph". Michael Hunger and Wes Freeman kindly helped but I failed to adapt the techniques learned to path finding queries that should return the paths. The issue: The below query takes roughly 3s and returns 13 rows (the paths found) from a database. I find it slow and would like to have it execute faster but don't know how to optimize it. (This is an example of course but I find similar other queries slow too.)

Is neo4j suitable for searching for paths of specific length

时间秒杀一切 提交于 2019-12-13 17:14:45
问题 I am a total newcommer in the world of graph databases. But let's put that on a side. I have a task to find a cicular path of certain length (or of any other measure) from start point and back. So for example, I need to find a path from one node and back which is 10 "nodes" long and at the same time has around 15 weights of some kind. This is just an example. Is this somehow possible with neo4j, or is it even the right thing to use? Hope I clarified it enough, and thank you for your answers.

Neo4j CSV file load with empty cells

蓝咒 提交于 2019-12-13 17:07:44
问题 I am loading a basic CSV file into Neo4j database which has got two columns - "name" and "property". The name column always has a value and "property" column can either have a value or a blank space. I would like to values to be linked with a relationship "property1". I am using this code: LOAD CSV WITH HEADERS FROM 'file:///fileName.csv' AS line MERGE (Test_Document:A {name: line.name}) WITH line, Test_Document FOREACH (x IN CASE WHEN line.property IS NULL THEN [] ELSE [1] END | MERGE

neo4j conditional relationship

試著忘記壹切 提交于 2019-12-13 16:34:42
问题 I am currently working on a program using graph db - neo4j and I need to realize the following function. I have two types of nodes, type A means stage, type N means let the user do some selections. First we have node A1 , which has several (2-5) type N children, N1 , N2 , N3 , ... Nodes A1 also have child nodes A2 , A3 , ... In java, after arriving at A1 , I will ask the users to do some selections according to Ni , then go to a type A child based on a function of the selections. For example,

Neo4j: Legacy Indexes and auto index vs new label bases schema indexes

て烟熏妆下的殇ゞ 提交于 2019-12-13 16:25:14
问题 I'm currently looking at the best way to index our data and from how I see it there are three options 1). Legacy indexes. (IndexManager API) 2). Auto indexes (neo4j.properties: node_auto_indexing=true, ode_keys_indexable=name,age, relationship_auto_indexing=true, relationship_keys_indexable=name,age) 3). New Schema Manager based index support, using labels. Both options 1 and 2 has the benefit that indexes can be managed on both nodes and relationships. But the legacy indexes needs to be