neo4j

Graph visualization frameworks

蓝咒 提交于 2019-12-19 12:21:53
问题 I want to visualize a Neo4j database in a graphical application. (I'm doing this primarily as a learning exercise). I want it to behave almost identically to the visualization in Neo4j's WebAdmin: When the graphic appears, I want to see the nodes moving around as they settle into their final locations, and I want the user to be able to click and drag node icons around the screen and have them stick where they are dropped, with the rest of the graph adjusting to account for the change. I have

Graph visualization frameworks

自古美人都是妖i 提交于 2019-12-19 12:21:37
问题 I want to visualize a Neo4j database in a graphical application. (I'm doing this primarily as a learning exercise). I want it to behave almost identically to the visualization in Neo4j's WebAdmin: When the graphic appears, I want to see the nodes moving around as they settle into their final locations, and I want the user to be able to click and drag node icons around the screen and have them stick where they are dropped, with the rest of the graph adjusting to account for the change. I have

Cypher MATCH query speed

非 Y 不嫁゛ 提交于 2019-12-19 10:23:59
问题 I have Neo4j installed on a windows machine with 12 processors and 64GB ram. I did not change any of the memory settings that Neo4j allows for. My database has 3.8m nodes, 210,000 of which are labeled as Geotagged and a total of 650,000 relationships. I am trying to run the following query and I am wondering if this is a really intensive query that will likely take quite a while. Messages.csv is my relationship file. The relationships have already been created, but as I could not figure out

SET label based on data within LOAD CSV

爷,独闯天下 提交于 2019-12-19 09:59:15
问题 I'm using Neo4j 2.2.0 and importing data (in the form of a nodes file and relationships file) via LOAD CSV. The nodes will all be imported under the "Person" label, however I want to add the "Geotag" label to some of them if their latitude and longitude fields in the nodes file are being empty. So, for example, the below nodes file (ignore the extra line in between rows) "username","id","latitude","longitude" "abc123","111111111","33.223","33.223" "abc456","222222222","","" I would like to

Cypher zip collections

纵饮孤独 提交于 2019-12-19 09:53:48
问题 If I have two collections, how might I zip them together? with [1,2,3] as nums, ['a', 'b', 'c'] as letters ... wat do? ... return zipped // [{a: 1}, {b: 2}, {c: 3}] 回答1: It may not be possible to dynamically assign map keys (e.g., using the items in letters ). But this query will return something similar to what you want (using collections instead of maps): WITH [1,2,3] as nums, ['a', 'b', 'c'] as letters RETURN EXTRACT(i IN RANGE(0, LENGTH(nums) - 1) | [letters[i], nums[i]]) AS result; The

Recreate reference node in a Neo4j database

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 09:04:26
问题 I accidentally deleted node 0, which was my reference node on a new graph, so calls to getReferenceNode() would fail afterwards. I searched through the Neo4j source and found a that I could recreate it using: GraphDatabaseService graphDb = new EmbeddedGraphDatabase("mytestdb"); ((EmbeddedGraphDatabase) graphDb).getConfig().getGraphDbModule().createNewReferenceNode(); Am I missing a better way to recreate the reference node? Sometimes it gets an id of 0, sometimes 5 when I run this, depending

Neo4j Cypher - String to Integer

两盒软妹~` 提交于 2019-12-19 08:55:05
问题 Here the value in property r.weight is a string. i have tried following possibilities to convert it into a integer, INT(r.weight) Integer.parseInt(r.weight) convert(INT,r.weight) but nothing works. Is there a proper function to do so? reduce(total = 0, r in relationships(p): total + INT(r.weight)) Note : Its not a possible duplicate of Gremlin type conversion Version : 1.9.5 回答1: As stated in the comments above there is no easy way to do this with Cypher in 1.9.x. As a workaround you could

In Neo4J, how to set the label as a parameter in a cypher query from Java?

安稳与你 提交于 2019-12-19 05:24:17
问题 I have problems with parameter in cypher in Neo4J from Java. I run the the database embedded. The code should be like this (GraphDB.cypher goes directly to the ExecutionEngine) HashMap<String, Object> parameter = new HashMap<>(); parameter.put("theLabel1", "Group"); parameter.put("theRelation", "isMemberOf"); parameter.put("theLabel2", "Person"); GraphDB.cypher("MATCH (n1:{theLabel1})-[r:{theRelation}]->(n2:{theLabel2}) RETURN n1, r, n2", parameter); but it ends in this exception Exception in

Neo4j 2 Cypher fuzzy search

↘锁芯ラ 提交于 2019-12-19 04:24:19
问题 I'm using Neo4j 2 REST API and I have the ability to add plugins. I have an entity in my database with the label 'Entity' and name 'United Kingdom'. How do I execute a fuzzy search to find this entity. I would like to be able to find it using queries like United Kingdom Uniter Kingdom United Kinjdom So the .*<query>.* won't do it. I notice there was support for something like this in previous versions. start n = node:index("name : 'United Kinjom'~0.2") return n But this doesn't appear to work

How to visualize a neo4j graph

我只是一个虾纸丫 提交于 2019-12-18 17:03:02
问题 I want to visualize a neo4j embedded graph within my JAVA application. I have read the Max De Marzi's Graph Visualization Blog but I could not find anything in JAVA but only ruby and C++ May you help me to find a guide to install something easy to visualize my graph? I need just to see nodes and relationships. P.S. I do not want to use external programs. As a result I do not like: linkurio neoclipse webadmin gephi etc. 回答1: What do you mean by visualize in Java application? If you wish to