neo4j

Neo4j db design. Edges with relationship? Filtered shortest path?

别说谁变了你拦得住时间么 提交于 2019-12-22 15:09:08
问题 H-i, I want to display a force directed graph using in D3. I'm trying to model it with Neo4j. The requirements are to decorate "Topics" and "Edges" with "Attachments". Topics and Edges display in the D3 graph. Attachments in a detail view of a Topic or Edge. This is the conceptual model (Topics and Edges graphed in D3): (attach1) -> (topic1) --edge12--> (topic2) <--edge23-- (topic3) <- (attach2) | | | | (attach3) (attach4) (attach4) (attach5) The simplest thing that doesn't seem to work is:

Neo4j db design. Edges with relationship? Filtered shortest path?

感情迁移 提交于 2019-12-22 15:09:01
问题 H-i, I want to display a force directed graph using in D3. I'm trying to model it with Neo4j. The requirements are to decorate "Topics" and "Edges" with "Attachments". Topics and Edges display in the D3 graph. Attachments in a detail view of a Topic or Edge. This is the conceptual model (Topics and Edges graphed in D3): (attach1) -> (topic1) --edge12--> (topic2) <--edge23-- (topic3) <- (attach2) | | | | (attach3) (attach4) (attach4) (attach5) The simplest thing that doesn't seem to work is:

Neo4j can I make relations between relations?

对着背影说爱祢 提交于 2019-12-22 13:34:25
问题 I'am using graph database (Neo4j) , and I need to make relations between relations , for example : (user1)-[:FOLLOWED]->(user2) I want to allow other users to like this activity (that user1 followed user2) , what's the best implementation for this ? 回答1: Short answer: You can't create a relation to a relation. How to do? You have to create an activity node in the middle of your relation: (user1)-[:FOLLOWED]->(activity{date:..., blabla:...})-[:ACTIVITY_FOR]->(user2) Then you'll be able to make

Check whether nodes exist in a neo4j graph

戏子无情 提交于 2019-12-22 13:32:33
问题 NOTE I let this become several questions instead of the simple one I asked, so I am breaking the follow-ups off into their own question here. ORIGINAL QUESTION I'm receiving a list of IDs that I am first testing whether any of them are in my graph, and if they /are/ I am processing those nodes further. So, for example... fids = get_fids(record) # [100001, 100002, 100003, ... etc] ids_in_my_graph = filter(id_is_in_graph, fids) # [100002] def id_is_in_graph(id): val = False query = """MATCH

Check whether nodes exist in a neo4j graph

♀尐吖头ヾ 提交于 2019-12-22 13:31:31
问题 NOTE I let this become several questions instead of the simple one I asked, so I am breaking the follow-ups off into their own question here. ORIGINAL QUESTION I'm receiving a list of IDs that I am first testing whether any of them are in my graph, and if they /are/ I am processing those nodes further. So, for example... fids = get_fids(record) # [100001, 100002, 100003, ... etc] ids_in_my_graph = filter(id_is_in_graph, fids) # [100002] def id_is_in_graph(id): val = False query = """MATCH

unable to delete node labels in neo4j

梦想的初衷 提交于 2019-12-22 13:06:52
问题 I have created 2 labels Person,Movies by : CREATE (ee:Person { name: "test", id: "1" }) CREATE (m:Movie { name: "movie_1", id: "2" }) When I Run : START n=node(*) OPTIONAL MATCH (n)-[r]-() DELETE n,r; But The Label still exists. How can I delete the label? 回答1: So, you don't actually delete labels you remove them (e.g. remove m:Movie). delete is used to remove nodes and/or relationships from the database. The following cypher example will match your movie node, remove the existing label, add

RabbitMQ Spring Boot Session Error

旧城冷巷雨未停 提交于 2019-12-22 12:41:12
问题 I am running into an issue when trying to pass a RabbitMQ queue message to my Spring Boot application. I am running spring data 4 and am using Neo4j as my database. I am able to recieve and parse a JSON string from the RabbitMQ queue to the spring boot app. Here is the thread change for the receiver process: 14:19:17.811 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8080 (http) 14:19:17.813 [main] INFO org.directoryx.Application - Started Application in 4

“Injection” concerns for Cypher over REST

时间秒杀一切 提交于 2019-12-22 12:27:33
问题 I was wondering if there is a concern for query injection when I query over REST? Parameterizing the query definitely makes things more cleaner but I was also able to query with string concatenation to manipulate properties and labels. I find the latter approach being more flexible because at times I can't query the way I want it following the paradigm of parameters. (Can I parameterize labels and properties on CREATE or SET? (REST and transaction)) If there is no worries of some sort of

Run Cypher for Apache Spark examples (CAPS)

早过忘川 提交于 2019-12-22 11:22:40
问题 I know that this a wide question, but it would be helpful for neo4j users those who aren't in a field of scala programming. I am in need to use Cypher for Apache Spark Project in order to create a Neo4j graph from a data-frame and then storing it into Neo4j. I tried to integrate the project in eclipse, but with no luck , i get a wired error, so i couldn't get the help of an IDE. What i need is a way to run the Scala example classes of this maven project ?? In another scala maven project a

Neo4j 3.0 and spring data

徘徊边缘 提交于 2019-12-22 11:09:06
问题 I would like to use the new bolt protocol to connect my spring application to neo4j 3.0 database. Is bolt protocol already implemented in spring data? 回答1: Yes, these versions support Bolt: Neo4j OGM 2.0.2, which can be used with SDN 4.1.1.RELEASE (you will need to explicitly include this Neo4j OGM version). Or the current SDN snapshot 4.2.0.BUILD-SNAPSHOT which depends on the latest Neo4j OGM snapshot. The Bolt Driver dependency is also required: <dependency> <groupId>org.neo4j</groupId>