neo4j

SDN 4 Session.query doesn't work for @QueryResult

谁都会走 提交于 2019-12-12 03:37:18
问题 In my SDN 4 project I have a @QueryResult POJO: @QueryResult public class WeightedDecision { private Decision decision; private double weight; public Decision getDecision() { return decision; } public void setDecision(Decision decision) { this.decision = decision; } public double getWeight() { return weight; } public void setWeight(double weight) { this.weight = weight; } } And a lot of Spring Data Neo4j repository methods that work fine with this WeightedDecision query result. Right now I'm

create nodes depending on certain condition in Neo4j

故事扮演 提交于 2019-12-12 03:34:00
问题 I want to create some new nodes in my database if some condition is satisfy MATCH (u:User)-[:has]->(a:Account)-[:initiated]->(l:Process) WHERE ID(l)=984 UNWIND [{mobile:123,email:'a@b.com'}, {mobile:456, email:'a1@b1.com'}] as x OPTIONAL MATCH (u1:User) WHERE u1.mobile = x.mobile OR u1.email = x.email CASE u1 WHEN u1 IS NULL THEN CREATE (u)-[:pending]->(p:Pending {mobile: x.mobile, email: x.email}) ELSE CREATE (u1)-[:pending]->(p:Pending {mobile: x.mobile, email: x.email}) END I want to check

No results from load2neo bulk load -curl POSTcomand

六月ゝ 毕业季﹏ 提交于 2019-12-12 03:28:42
问题 I'm trying to insert a lot of data into my neo4j db. After reading some opinions I've decided to use load2neo to do so. I've parsed my data in the geoff format. Inserted the line org.neo4j.server.database.location=/Users/Lucas/Documents/Neo4j/testdb.load2neo=/load2neo at my database properties file and placed the two .jar files at /Applications/Neo4j\ Community\ Edition.app/Contents/Resources/app/plugins but when I try to run the Bulk Load command line: curl -X POST http://localhost:7474

Is there a way to get all the labels for a node in SDN 4.0

谁都会走 提交于 2019-12-12 03:28:29
问题 I want to get all the labels belongs to a node, if there a way to do this in one query in SDN 4.0? For example, my current repo is like Book findById(Long bookId); @Query("MATCH (n:Book) where id(n)={0} set n:AnotherLabel return n") Book updateBookLabel(Long bookId); is there anyway I can simply book.getLabels(); to retrieve all the labels for this book node. the class for book is @NodeEntity public class Book extends Something { } Yes, by default, my Book node should has two label Book and

level-2 or level-3 connections when we have bidirectional relationship

别说谁变了你拦得住时间么 提交于 2019-12-12 03:26:42
问题 Extention to this question Neo4j - Get Level2 or Level3 connections I have the following relationship in Neo4j. Few nodes have bidirectional relationsips I want to fetch the level-2 or level-3 connections for the given user. I have the following CQL START levelGraph=node(1) MATCH path=(user1:User)-[knows:KNOWS*2..2]->(user2:User) WHERE user1.mobile = 9000090001 RETURN user1, user2, length(path) as downlevel ORDER BY length(path) asc this one is giving me all the nodes who has relationship

Neo4j export to Gephi

不羁岁月 提交于 2019-12-12 03:26:30
问题 How would I export the data in my neo4j database for use in the gephi program? You can export it as json or csv in the dashboard but that doesnt work in gephi. I am using using neoclient right now to manage cypher queries but it seems like they do not have methods to do this. 回答1: There is a Neo4j-Gephi plugin, but I don't believe it supports the most recent versions of Neo4j. The best method is probably to use export functionality in neo4j-shell-tools to export to CSV or GraphML. 来源: https:/

Neo4j embedded database doesnt show the browser in a spring boot app

三世轮回 提交于 2019-12-12 03:24:01
问题 [update] Please find the config classes here : https://github.com/veeseekay/fooflix. To run, you can just do a gradle clean build java -jar build/libs/fooflix.jar When you point to localhost:8686 - gives a 404. However, I am running this within my IDE and the browser shows up fine. I have successfully embedded neo4j within my spring boot application. I could even bring up the webadmin/browser for neo4j using this : How to enable neo4j webadmin when using spring-data-neo4j? However there is a

In REST API for neo4j, how to merge or create nodes?

梦想的初衷 提交于 2019-12-12 03:22:16
问题 I am running a local instance of neo4j ("Community" edition) on a Windows 10 laptop. My client is in Java and uses the REST API (via port 7474) to talk with the neo4j database. QUESTION: is there some way to get the equivalent of a MERGE/CREATE directive in cypher to happen via the REST API call to /db/data/node endpoint? I'm guessing that I could impose a unique constraint on different node types and achieve the desired behavior. But out of the box, what I am hoping for is a single endpoint

Neo4j and Lucene multikey queries (or: should I use Cypher?)

☆樱花仙子☆ 提交于 2019-12-12 03:16:38
问题 I have a graph in Neo4j in which nodes represent random points in the plane, each node having the coordinates stored as properties (x and y, the value type is double ). I create the nodes and index them: IndexManager index = graph.index(); Index<Node> nodesIndex = index.forNodes("points"); for (int i = 0; i < points.length; i++) { Point p = points[i]; Node n; Transaction tx = graph.beginTx(); try { n = graph.createNode(); n.setProperty("x", p.getX()); n.setProperty("y", p.getY()); nodesIndex

error while exporting neo4j to Graphml

怎甘沉沦 提交于 2019-12-12 03:13:58
问题 I'm trying to export Neo4j graph (with 4318 nodes & 8145 Relationships) for testing using gremlin-groovy-2.3.0 using: g = new Neo4jGraph('/tmp/mygraph'); g.saveGraphML('mygraph.xml'); but getting list of errors when typing the 1st command in console ( gremlin-groovy-2.3.0/bin/gremlin.bat ), Last line of error: Error: Component: 'org.neo4j.kernel.StoreLockerLifecycleAdapter@5e1a7112 was successfully initialized, but failed to start I have copied the Neo4j database ( \data\graph.db ) to Gremli