neo4j

Error loading Neo4j from grails app

▼魔方 西西 提交于 2019-12-11 19:06:09
问题 I am using Grails 2.0.1 and Neo4J 1.8, and would like to instantiate a Neo4j database in my spring resources file like this: import org.codehaus.groovy.grails.commons.ConfigurationHolder as CH; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.factory.GraphDatabaseFactory; import org.neo4j.graphdb.factory.GraphDatabaseSettings; // Place your Spring DSL code here beans = { GraphDatabaseService db = getGraph(); enronService(com.fxpal.neo4j.EnronService) { graph = db; index

Neo4j - extract all subgraphs from neo4j database

冷暖自知 提交于 2019-12-11 18:47:44
问题 I have a similar question to the one asked here, however, the solution proposed didn't work for me. My Neo4j database has a lot of sub-graphs, each one of them contains varying number of nodes. I would like to extract some kind of a list which will contain all sub-graphs separated. In the example given, I would like to get 3 groups, where each group contains all the nodes in the sub-graph which the group represents. How can I get all groups of nodes by Cypher query? All the solutions that I

Neo4J Rest Data Graph - using SpringData - connection refused exception

萝らか妹 提交于 2019-12-11 18:12:53
问题 I have a project that use successfully a Neo4J embedded data graph, using SpringData. I'm trying now to change it to REST database, with no success. I followed the (simple) instructions and it should have been really easy and straight forward, but I keep getting exceptions on server startup. I set the server, as in the examples, to http://localhost:7474/db/data/ and I get 'connection refused' when starting the Tomcat. I would like to mention that currently I'm running this code on my local PC

Neo4j - Performance of lookups on edge properties in WHERE clause

戏子无情 提交于 2019-12-11 18:10:01
问题 I've got a data model that I want to roughly model after the article posted in this Graphgist. I'm curious as to the performance that I can expect on the WHERE clause in the case that a given set of 2 nodes has a large number of relationships between them with 'from' and 'to' parameters defined on each edge. When you do a match query like this where you have let's say 100 SELLS relationships, how does Neo4J handle performance of filtering down the edges to just the one(s) that matter based on

neo4j HA cluster end points return 404

烂漫一生 提交于 2019-12-11 18:05:32
问题 I'm running a 4 node (2 cluster nodes, 2 arbiter nodes) neo4j 2.2.5 enterprise cluster on 2 virtual machines in a private subnet within AWS EC2 (Linux). I'm able to start the clusters and have members join them. However, when I try to access the health check URLs even on the local machine, I receive a 404 error. I may have missed something very basic here and would appreciate any pointers. The same thing works fine on my local machine. Also, on the server the system takes about 2 minutes to

Neo4j Connecting multiple relationships between multiple nodes

笑着哭i 提交于 2019-12-11 17:34:40
问题 I am trying to achieve what is shown here: I have 2 CSV Files, diease_mstr and Test_mstr Now in Test_mstr, I have many test to disease ID records, which means none of them are unique. The disease ID points to disease_mstr file. In disease_mstr file I have only 2 fields, ID and Disease_name (disease name is unique). Now, I am creating 3 nodes with labels 1) Tests (only "testname" property) which will have unique tests (total 345 unique testnames) **Properties :** a) testname 2) Linknode

Constraints for graph models

 ̄綄美尐妖づ 提交于 2019-12-11 17:28:58
问题 I have four possible chains that can be formed with 6 different chain links: G0 -> G1 -> G2 E0 -> E1 -> E2 G0 -> E1 -> G2 E0 -> G1 -> G2 Now I want to express this four chains using a graph model which would look like the following picture: If I use a graph query language to ask eg give me all paths having G0 as first vertex and E2 as last vertex, I would get a path G0 -> E1 -> E2 which is not a valid path or chain out of the four... So my question is is there a possibility to express such

Create relationship after matching with aggregate and multiple order by clauses

流过昼夜 提交于 2019-12-11 17:24:40
问题 Follow up question on This question I now need to create the relationship between a station and a neighborhood (LOCATED_IN). The first query successfully returns only 1 row per station (1 combination). The second query where I want to create the relationship, creates too much relationships. MATCH (n:Neighborhood),(s:Station) WITH n, s, distance(n.centerLocation, s.point) AS dist ORDER BY dist RETURN s.stationId, COLLECT(n)[0].name AS name, COLLECT(dist)[0] AS shortest ORDER BY s.stationId

Parsing the JSON result from a Cypher query with Neo4j REST API in Java using JsonReader

人盡茶涼 提交于 2019-12-11 16:59:06
问题 I have currently written a program that retrieves the JSON result of a Cypher query that I have made to a Neo4j database using the REST API. This project has was written in Android Studio, and the code for it is listed below: public class MainActivity extends AppCompatActivity { private TextView userText; private Button clicker; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); userText = (TextView)

Neo4j Variable Depth not working

家住魔仙堡 提交于 2019-12-11 16:42:40
问题 I am trying to build a cypher query for two scenarios : Tests having depth more than 2 Specific test having depth more than 2 As in Image you can see tests 1, 2, 3 are somewhat related through depth more than 2. The cypher which i ran was : MATCH p=()<-[r:TEST_FOR*..10]-() RETURN p LIMIT 50 Now when i Change my cypher to below then i get no records/results or nodes. 1) MATCH p=()<-[r:TEST_FOR*2..5]-() RETURN p LIMIT 50 2) MATCH p=()<-[r:TEST_FOR*2]-() RETURN p LIMIT 50 3) MATCH p=(d:Disease)<