neo4j

Neo4j 2 and Java 8

人盡茶涼 提交于 2019-12-12 10:59:10
问题 Java 8 is being released this week. When using neo4j 1.9 with Java 7 we saw warnings popping up that only 6 was supported but we never had any problem with the 1.9/7 combination. I know that neo4j 2 cannot use anything less than Java 7, but are there any restrictions for neo4j 2 to run on Java 8? 回答1: We are currently using neo4j in combination with Java 8 at our company and (for ~3.5 months) I didn't notice anything wrong related to Java 8 at all. Yes, there are warnings, but still, it looks

Error Obtaining Lock (org.neo4j.kernal.StoreLockException)

微笑、不失礼 提交于 2019-12-12 10:43:56
问题 When trying to create new nodes in an already existing database, I am getting the following exception: org.neo4j.kernal.StoreLockException . The code snippit below is the actual line that results in the exception. Below that I have attached some more detail and the full stack trace. If I create a new folder and use that as the DB_PATH , then my code works fine on the first run. On the second run, it will fail with the same exception. It appears something is preventing the lock from being

Neo4j Cypher query to find nodes that are not connected too slow

倖福魔咒の 提交于 2019-12-12 10:38:52
问题 Given we have the following Neo4j schema (simplified but it shows the important point). There are two types of nodes NODE and VERSION . VERSION s are connected to NODE s via a VERSION_OF relationship. VERSION nodes do have two properties from and until that denote the validity timespan - either or both can be NULL (nonexistent in Neo4j terms) to denote unlimited . NODE s can be connected via a HAS_CHILD relationship. Again these relationships have two properties from and until that denote the

Error while retrieving neo4j node data through java

こ雲淡風輕ζ 提交于 2019-12-12 10:23:30
问题 I have loaded about 60k nodes into neo4j through talend. I want to get access to these nodes through java. Java code is only able to fetch a single node which comes with neo4j itself i.e. 0th node. My Java code is : package com.Neo4J; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import javax.naming.spi.DirStateFactory.Result; import org.neo4j.cypher.javacompat.ExecutionEngine; import org

Cypher query to take all relationships from one node, and attach them to another node

对着背影说爱祢 提交于 2019-12-12 08:55:46
问题 My question is.. given two nodes, node A & node B, is there a cypher query that removes all of the relationships from node A and attaches them instead to node B, so that all nodes that were previously attached to node A, are now attached to node B? I'm sure there are many use cases for such a query, but my use case is to do with merging multiple social network logins: Given that I have a member account (member1) using google as a sign in provider And I have a separate member account (member2)

Neo4j Server vs Embedded mode

懵懂的女人 提交于 2019-12-12 08:48:00
问题 I wanted to know exactly what is meant by neo4j server and the embedded mode. Even i gone through the post Neo4j Server vs. Embedded. But i dint get clearly those concepts. I have installed neo4j 2.1.1 on windows 64bit machine which is a neo4j server. So when neo4j embedded mode will come into picture? Also how can we switch between embedded mode to server mode or vice-versa? When i was working with mysql to neo4j migration(using batch-import), after importing the nodes and relationships into

neo4j: one-directional / two-directional relationships?

六月ゝ 毕业季﹏ 提交于 2019-12-12 07:45:45
问题 So I looked into neo4j, and I may be using it in an upcoming project since its data model might fit my project very well. I looked through the docs but I still need an answer to this question: Can I set relationships to be one-directional? It seems that the neo4j people like movies so let's continue with that. If I have a graph like this: Actor A -> [:Acts in] -> Movie B then direction is obvious, because the nodes are different types. But I like horror movies so... Person A -> [:wants_to

localhost:7474/graphaware/changefeed/CFM gives 404

霸气de小男生 提交于 2019-12-12 06:57:53
问题 i am trying to track latest changes in neo4j in Server Mode so i followed this link https://github.com/graphaware/neo4j-changefeed as i see some extra node are added and here are changes about my db but http://localhost:7474/graphaware/changefeed/CFM gives me 404 i am using neo4j 2.2.2 and my neo4j.properties com.graphaware.runtime.enabled=true com.graphaware.module.CFM.1=com.graphaware.module.changefeed.ChangeFeedModuleBootstrapper com.graphaware.module.CFM.maxChanges=100 com.graphaware

How to set property name and value on csv load?

老子叫甜甜 提交于 2019-12-12 06:23:15
问题 How can one set both the property name and its value loading a tall skinny csv file? The csv file would contain only 3 columns, node name (id), property name (p) and property value (v). A node with to properties would therefore correspond to 2 lines. LOAD CSV... row MERGE (n) WHERE n.Name = row.id SET n.{row.p} = row.v This syntax doesn't exit it's just to explain what I'd like to do. Is there a way to do such a thing in cypher? That be really useful rather than having to pivot data first. A

What's going wrong with the phase of importing relationships?

末鹿安然 提交于 2019-12-12 06:19:15
问题 I finally conquer the phase of importing nodes. Now I am trying to import relationships. There might be 1B relationships. #!/bin/bash cd /home/luning/neo4j-enterprise-2.2.0-RC01-unix/neo4j-enterprise-2.2.0-RC01/bin users="/data/weibo/user-header.csv" for i in /data/weibo/users/* do users=$users,$i done edges=/data/weibo/edge-header.csv,/data/weibo/ego/000000_0 ./neo4j-import --stacktrace --into ../data/weibo_bak.db --nodes:User $users --relationships:Follow $edges --delimiter TAB --quote \' -