neo4j

Naming convention for bidirectional relationships in Neo4j (using Spring Data)

自闭症网瘾萝莉.ら 提交于 2019-12-23 04:24:50
问题 I need some advice to give name to relationships. Plus, I'm not sure on how I have to annotate my domain entities with spring data. Most of examples that I've seen are unidirectional and the name chosen are pretty straightforward. Supose the following example: @NodeEntity public class Person { @Indexed private String name; @RelatedTo(type="OWNS", direction=Direction.OUTGOING) private Set<Car> cars; } The relationship name seems ok, no problem. Now suppose that I want to make this relationship

Multiple relationships in Match Cypher

。_饼干妹妹 提交于 2019-12-23 03:51:43
问题 Trying to find similar movies on the basis of tags. But I also need all the tags for the given movie and its each similar movie (to do some calculations). But surprisingly collect(h.w) gives repeated values of h.w (where w is a property of h ) Here is the cypher query. Please help. MATCH (m:Movie{id:1})-[h1:Has]->(t:Tag)<-[h2:Has]-(sm:Movie), (m)-[h:Has]->(t0:Tag), (sm)-[H:Has]->(t1:Tag) WHERE m <> sm RETURN distinct(sm), collect(h.w) Basically a query like MATCH (x)-[h]->(y), (a)-[H]->(b)

Neo4J TraversalDescription Definition

瘦欲@ 提交于 2019-12-23 03:51:39
问题 I am trying to create a TraversalDescription that will perform the following search; Return only nodes that have a certain property ("type" == "PERSON") Return a certain fixed number of results (the entire graph is huge, we are only interested in the local graph) Any relationship types can be used I haven't managed to get very far, I can't seem to figure out how to create an Evaluator for node properties; TraversalDescription td = Traversal.description().bredthFirst().evaluator(?...); 回答1: I

Neo4J TraversalDescription Definition

不打扰是莪最后的温柔 提交于 2019-12-23 03:51:27
问题 I am trying to create a TraversalDescription that will perform the following search; Return only nodes that have a certain property ("type" == "PERSON") Return a certain fixed number of results (the entire graph is huge, we are only interested in the local graph) Any relationship types can be used I haven't managed to get very far, I can't seem to figure out how to create an Evaluator for node properties; TraversalDescription td = Traversal.description().bredthFirst().evaluator(?...); 回答1: I

Upload files to Graphileon InterActor as node background

怎甘沉沦 提交于 2019-12-23 03:37:08
问题 I installed Graphileon InterActor using Docker on Windows. The Styling Documentation says that files can be uploaded using the following command in style menu: "image": "(%).properties.file", // image as node background When starting InterActor I follow this command: You can run the InterActor image using the following command, which will also create a volume "interactor" where persistent data (the config, and files you upload to InterActor) will be stored. And type in: $ docker run -t -d -p

Error creating relationships over huge dataset

懵懂的女人 提交于 2019-12-23 03:32:12
问题 My question is similar to the one pointed here : Creating unique node and relationship NEO4J over huge dataset I have 2 tables Entity (Entities.txt) & Relationships (EntitiesRelationships_Updated.txt) which looks like below: Both the tables are inside an import folder within the Neo4j database. What I am trying to do is load the tables using the load csv command and then create relationships. As in the table below: If ParentID is 0, it means that ENT_ID does not have a parent. If it is

SDN4/OGM Cypher query and duplicates at Result

和自甴很熟 提交于 2019-12-23 03:24:07
问题 I have a following Cypher query: MATCH (parentD)-[:CONTAINS]->(childD:Decision) WHERE parentD.id = 1 OPTIONAL MATCH (childD)-[sortValue1:HAS_VALUE_ON]->(sortCharacteristic1:Characteristic) WHERE sortCharacteristic1.id = 1 WITH * MATCH (childD)-[ru:CREATED_BY]->(u:User) OPTIONAL MATCH (childD)-[rup:UPDATED_BY]->(up:User) WITH ru, u, rup, up, childD , sortValue1 ORDER BY sortValue1.value ASC SKIP 0 LIMIT 100 RETURN ru, u, rup, up, childD AS decision, [ (parentD)<-[:DEFINED_BY]-(entity)<-[

Finding triplets having highest common relationships in Neo4j

北战南征 提交于 2019-12-23 03:18:23
问题 I have two types of nodes in my graph. One type is Testplan and the other is Tag. Testplans are tagged to Tags. I want most common pairs of Tags that share the same Testplans with a Tag having a specific name. I have been able to achieve the most common Tags sharing the same Testplan with one Tag, but getting confused when trying to do it for pairs of Tags. The cypher returning the list of single tags is shared below MATCH (kw1:Tag)<-[e:TAGGED]-(tp1:Testplan)-[e2:TAGGED]->(kw2:Tag) WHERE kw1

Importing a large xml file to Neo4j with Py2neo

岁酱吖の 提交于 2019-12-23 02:45:16
问题 I have a problem in importing a very big XML file with 36196662 lines. I am trying to create a Neo4j Graph Database of this XML file with Py2neo my xml file look like that: http://imgur.com/pLylHeG and My python code to import the xml data into Neo4j is like that: from xml.dom import minidom from py2neo import Graph, Node, Relationship, authenticate from py2neo.packages.httpstream import http http.socket_timeout = 9999 import codecs authenticate("localhost:7474", "neo4j", "******") graph =

Neo4j : Advices for hardware sizing and config [closed]

坚强是说给别人听的谎言 提交于 2019-12-23 02:39:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I've been playing with a neo4j 2.0 db for a few months and I plan to install the db on a dedicated server. I've already tried several configs of neo4j (jvm, caches, ...) but I'm still not sure to have found the best one. Therefore, it seems better to ask to the experts :) Context Db primitives: Nodes = 224,114