neo4j

how to find 2nd level of connections in neo4j?

廉价感情. 提交于 2019-12-08 20:28:34
问题 My neo4j graph shows like below.. 300 is connected to 100 and 100 is connected to 201 and 400 . I want to find out the 2nd level of connectivity in neo4j. For example: the 2nd level of node for 300 should return me 201 and 400 Is it possible in neo4j? when I use below cypher query: MATCH (n)-[:CALLED*2]-(result) WHERE n.name = '300' RETURN result It should give me only 201 and 400 ,but it return like below 回答1: This is very easy in Neo4j. If you're using Cypher it might be something like:

How to access new neo4j ubuntu/ec2 install?

五迷三道 提交于 2019-12-08 19:09:30
I installed neo4j on ec2 and started the service. If I curl http://localhost:7474 from within the remote shell, it returns something positive: { "management" : "http://localhost:7474/db/manage/", "data" : "http://localhost:7474/db/data/", "bolt" : "bolt://localhost:7687" } I opened port 7474 in the security group of my ec2 instance. However when I try to access http://ec2-52-3-253-2.compute-1.amazonaws.com:7474/ in my browser, the site can't be reached. Is there a step I am missing to expose the neo4j service to the public on ec2? I am not sure how does Neo4j run on ec2, but try setting this

neo4j - how to set label with property value

你。 提交于 2019-12-08 17:47:11
问题 I have nodes without label but a property NodeType Is there a way to set the label of those nodes with the value of the NodeType property? Thanks! 回答1: No, currently there is no possibility to define a label with a variable. You'll have to do it in your application by fetching all nodes that you want to add a label on it and sending a Cypher Query to add this label. A quick example in PHP : $nodes = $client->sendCypherQuery('MATCH (n) WHERE n.nodeType = "MyType" RETURN n'); foreach ($nodes as

Neo4j replication alternative to Neo4j Enterprise edition?

扶醉桌前 提交于 2019-12-08 17:09:41
问题 It seems Neo4J High Availability is only available for the Enterprise edition which is paid- is there another alternative to achieve replication without that module? (i.e. without cost). Thanks for any help! 回答1: Update : This answer has changed. Neo4j is now open core, so the Enterprise code is no longer dual-licensed - only the commercial license option remains. You can find more details here: https://neo4j.com/open-core-and-neo4j/ Original Answer: Enterprise is available as quid-pro-quo -

Trying to understand identifiers and collections in MATCH and WHERE

房东的猫 提交于 2019-12-08 16:43:23
问题 I am trying to understand to what kind of cypher "data structure" certain identifiers or expressions correspond to, depending on how and where they are used. Below I list examples I encountered. Please tell me if I got it right (in the comments) or if I am missing something. MATCH (a:MYTYPE { label:'l_a' }) // a corresponds to a collection of nodes MATCH (b:MYTYPE { label:'l_b' }) // so does b MATCH p=(a)-[sp1:CF*]->(b)-[sp12:CF]->(c) // p corresponds to a collection of paths // a and b

Change node label in neo4j

拈花ヽ惹草 提交于 2019-12-08 14:43:28
问题 I have created a node with a wrong label. Is there any way to change node label or relationship type without re-creating it? I have tried something like MATCH n WHERE Id(n)=14 SET n.Labels = 'Person' but it is fault... 回答1: You can change the nodes associated with a label but you can't change the type of a relationship. Conceptually, if you take your chicken out of one coop and put it in another you haven't altered the substance of the chicken. But by the time you take the chicken out of the

Weighted page rank graph representation

天涯浪子 提交于 2019-12-08 14:19:48
问题 I have a graph like: (A, 900, B) //implying it takes 900 hours to move from task A to task B (B, 800, C) // implying it takes 800 hours to move from B to C. Now I assume in my page rank algorithm task C should have higher page rank. But it is not happening. I am using Neo4j's page rank algorithm to import the graph. My question is am I representing the graph in an incorrect way. I think this is a general problem of representing graphs and calculating page ranks based on them. Should I

map owl to neo4j (java example)

こ雲淡風輕ζ 提交于 2019-12-08 13:02:30
问题 I want to map ontology from OWL into Neo4j database. I have found some example here. If I understand it well I need to create Java program with OWL API libraries included. I don't need any inference engine (according to this: Mapping from an OWL ontology to Neo4j graph database). I have created project in Eclipse add OWL API (and oboformat) libraries and paste the code private void importOntology(OWLOntology ontology) throws Exception { OWLReasoner reasoner = new Reasoner(ontology); if (

Starting the console with my own graph

半腔热情 提交于 2019-12-08 12:44:08
问题 To experiment with Cypher I wanted to load the console with my own graph. Two questions here come: Can I do it on a locally installed server? How to provide the graph configuration (the "graph setup" piece) as a default setup? Thanks! 回答1: Yes, you can run console yourself against your own database. This assumes you have git, maven and jdk properly installed. git clone git://github.com/neo4j-contrib/rabbithole.git cd rabbithole mvn assembly:single java -cp "target/neo4j-console-jar-with

Neo4j - Unable to load Relations from csv

不打扰是莪最后的温柔 提交于 2019-12-08 12:18:52
问题 I am trying to load the data from the csv and display the nodes along with the relations as the graph in Neo4j. I am able to load the entity1 and entity2 in Neo4j, but unable to load the relations from the csv. My csv file looks like this Below is my CYPHER Code LOAD CSV WITH HEADERS FROM "file:////csvFiles/Fraud_Triplets_Neo4j.csv" AS csvLine MERGE (a:Subject { Object1:csvLine.Entity1 ,display:csvLine.Entity1 }); LOAD CSV WITH HEADERS FROM "file:////csvFiles/Fraud_Triplets_Neo4j.csv" AS