neo4j

Strange behavior in neo4j when I try to get all the nodes which relate with a master node

时间秒杀一切 提交于 2019-12-11 19:58:46
问题 I am trying to write a query which will give me all the nodes which are connected with a "master" node. Lets say that the node connect like this: A -> B B -> C C -> D C -> E B -> F What I want initially is to write a query which will return to me all the node's names under the master node A. All the nodes are related with a "contain" relationship. I wrote this query: MATCH (n {gid:'58749'})-[:contains*]-(z) RETURN z as names When I run this query in the neo4jServer I get a nice graph, which

An effective way to lookup duplicate nodes in Neo4j 1.8?

蹲街弑〆低调 提交于 2019-12-11 19:57:20
问题 I'm trying to programmatically locate all duplicate nodes in a Neo4j 1.8 database (using Neo4j 1.8). The nodes that need examination all have a (non-indexed) property externalId for which I want to find duplicates of. This is the Cypher query I've got: START n=node(*), dup=node(*) WHERE HAS(n.externalId) AND HAS(dup.externalId) AND n.externalId=dup.externalId AND ID(n) < ID(dup) RETURN dup There are less than 10K nodes in the data and less than 1K nodes with an externalId . The query above is

Adding relationships to a Neo4j database in parallel

一曲冷凌霜 提交于 2019-12-11 19:48:14
问题 Im trying to add relationships to a Neo4j graph I created in parallel using Java's ExecutorService. I'm having two issues. First, is while all my runnables are sumbitted my program jumps forward and closes the Transaction. Second, if I keep the Transaction open (via an infinite before hand so it doesn't close so that problem isn't really solved), when the runnables are being executed they are not able to add the relationships and seem to be stuck on those lines of code. private void createDB(

can't start neo4j service after moving directory

邮差的信 提交于 2019-12-11 19:41:43
问题 I have a windows 7 x64 machine. I installed neo4j which went very smoothly. I then managed to install neo4django and neo4j-embedded and that was fine too. However I decided to change the directory it was in, so I stopped the neo4j service in powershell and moved it to a different spot. Since then I haven't been able to restart the service, though if I run the console it starts neo4j in a java.exe window (I think) and thus it works (localhost:7474 accessible, able to run the neo4j-embedded

find the group in Neo4j graph db

自闭症网瘾萝莉.ら 提交于 2019-12-11 19:34:25
问题 I am using Neo4j for my project. In my graph DB I have 2 types of nodes: person fruit person nodes may be connected with each other with relation friend person nodes are connected with the nodes of fruits if they like that fruit. I want to find the set of group of 3 people who likes for example apple peach and orange and there is at least the path from one person to 3rd with relation "friend", or all 3 are friends. Since I have started using neo4j just recently, I need Guru's help to come up

Issue with concurrent POST requests with Jersey REST and Neo4j environment

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:34:18
问题 I have Jersery Rest service and i am using Neo4j Embedded Database to serve requests with data. Now when i make concurrent GET requests it works fine. But when i make concurrent POST requests It gives Following Exception : Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter@62f1ca5e' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance

org.neo4j.kernel.lifecycle.LifecycleException in Neo4j

老子叫甜甜 提交于 2019-12-11 19:33:31
问题 I've been using neo4j 1.9 RC1 for the past two months. Yesterday, after an eclipse crash I started having this this exception: Exception in thread "main" java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager@bf5743' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:282) at org.neo4j.kernel

Neo4j Same Entity Relationship persistence issue

有些话、适合烂在心里 提交于 2019-12-11 19:24:42
问题 Is is possible to pls advice me how to go about.. doing a Same Entity Relationship.. For ex. Entity(class Person) relatesTo Entity(class Person). CODE: @NodeEntity public class Person { @GraphId @GeneratedValue private Long id; @Indexed(indexType = IndexType.FULLTEXT, indexName = "searchByPersonName") private String personName; @Fetch @RelatedTo(type = "CONNECTS_TO", direction = Direction.BOTH) private Set<ConnectedPersons> connectedPersons; public ConnectedPersons connectsTo(Person endPerson

Neo4J Cypher: Find out two or more related matching nodes and display them as groups without repeating all possible combination of matches

左心房为你撑大大i 提交于 2019-12-11 19:23:45
问题 Requirements: Find out two or more related matching nodes and display them as groups without repeating all possible combination of matches Data structure: E1 is entity 1 N1 is name of entity 1 P1 is phone of entity 1 E2 is entity 2 N2 is name of entity 2 P2 is phone of entity 2 E3 is entity 3 N3 is name of entity 3 P3 is phone of entity 3 Query Used: start e1=node:entities('entityID:90754 OR entityID:113184 OR entityID:29472') match (n1)<-[:HAS_NAME]-(e1)-[:HAS_PHONE]-(p1), (p1)-[m:MATCHES_TO

Unable to start Neo4j on Windows, no error messages

笑着哭i 提交于 2019-12-11 19:21:49
问题 I'm using the following on Windows 7: neo4j-community-1.9.2 Java 7 Update 25 I have Windows Firewall disabled. When I start Neo4j.bat, both as Administrator and normally, I get the following message: c:\Tools\neo4j\bin>Neo4j.bat 28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim eout to: 120000ms based on -1 A blank Java console window pops up, no messages, then the window disappears after a minute or so. When I go to http://localhost:7474/ , I just get a server