py2neo

neo4j - localhost:7474 browser - which nodes are coloured? (py2neo)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 09:46:42
问题 neo4j - localhost:7474 browser - which nodes are coloured? (py2neo) I am creating a complex neo4j database with py2neo. So far I have 6 node indices and labels, and 5 relationship indices and labels. When I look through the localhost:7474/browser , some of my node type get coloured, some stay gray. What is the trigger that colours the nodes in the localhost:7474/browser - or are there only 4 colours in the preset? Thanks a lot! 回答1: There are 6 colors in total right now. Nodes with a label

py2neo using get or create in WriteBatch

﹥>﹥吖頭↗ 提交于 2019-12-13 15:16:49
问题 I am just getting started with Neo4j and py2neo. I am experimenting with the batch feature available in py2neo for bulk data loading of a neo4j database. At a basic level, I want to create two nodes (or get them if they already exist) and create a relationship between them with a default weight (or increment the weight if the relationship already exists) using WriteBatch in py2neo. The documentation explains only how to create two new nodes and form a relationship between them. I am looking

How to get automatic node ID from py2neo?

你离开我真会死。 提交于 2019-12-12 21:06:00
问题 I'm using py2neo 3.1.2 version with Neo4j 3.2.0 and I have a question about it. At Neo4J's web interface I can run the following query to get the nodes ids: MATCH (n:Person) RETURN ID(n) I'd like to know if there's something at py2neo API that does that same thing. I've already inspected the Node object, but I couldn't find anything about it. 回答1: Update: Previous Answer does not work with new py2neo but this answer works The current version of py2neo (4.0.0b12) dropped the remote method. Now

Creating neo4j graph database from csv file using py2neo

半世苍凉 提交于 2019-12-12 12:23:14
问题 I am currently working in a doctoral program and i am interested about Py2neo, so I am using it in order to perform some experiments using social graphs. However I got into newbie troubles. Excuse me for asking these simple questions. I got a xml dataset containing data about publications of a jornal, I have converted it into a csv table, there are about 700 records and each record is composed by four fiels: date, title, keywords, author. So my first question is how to create a graph from

How to extract all subgraph from neo4j

流过昼夜 提交于 2019-12-12 04:30:52
问题 I'm using neo4j and I build a large graph that has a lot of subgraph. For example, in the pic below there are 4 subgraphs. So how can I get 4 groups of nodes by cypher query? I'm using neo4j 3.0 回答1: If you want to display all node along with all relationships, you can use a quick and easy cypher query at your disposal. Assuming there are no restrictions applicable to your account: MATCH (n) RETURN n 来源: https://stackoverflow.com/questions/43337932/how-to-extract-all-subgraph-from-neo4j

How do I import Python node dicts into neo4j?

二次信任 提交于 2019-12-12 03:52:15
问题 I produce the following node and relationship data in a for loop about 1 million times. The idea is that investor nodes connect to company nodes by relationship edges: investor = {'name': owner['name'], 'CIK': owner['CIK']} relationship = {'isDirector': owner['isDirector'], 'isOfficer': owner['isOfficer'], 'isOther': owner['isOther'], 'isTenPercentOwner': owner['isTenPercentOwner'], 'title': owner['title']} company = {'Name': json['issuerName'], 'SIC': json['issuerSIC'], 'Ticker Symbol': json

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

Batch loading neo4j

こ雲淡風輕ζ 提交于 2019-12-12 02:26:23
问题 I am batch loading a neo4j graph using py2neo using this script: batch = neo4j.WriteBatch(graph) counter = 0 for each in ans: n1 = graph.merge_one("Page", "url", each[0]) # batch.create(n1) counter +=1 for linkvalue in each[6]: try: text,link = linkvalue.split('!__!') n2 = graph.merge_one("Page", "url", link) # batch.create(n2) counter+=1 rel = Relationship(n1,'LINKS',n2, anchor_text=text) batch.create(rel) except (KeyboardInterrupt, SystemExit): print 'fail' raise if counter > 900: counter =

python code works fine on python shell but not through cmd when importing py2neo [duplicate]

為{幸葍}努か 提交于 2019-12-11 20:39:44
问题 This question already has answers here : Why does this work in the Python IDLE shell but not when I run it as a Python script from the command prompt? (4 answers) Python csv import fails (2 answers) Closed last year . as said in the title I'm having problem runnig my code from cmd which is working just fine in python shell. I have py2neo version 4. here is my code: from py2neo import Graph print ("passed") here is the output from python shell: passed >>> here is the output from cmd command: D

find the group in Neo4j graph db

自闭症网瘾萝莉.ら 提交于 2019-12-11 19:34:25
问题 I am using Neo4j for my project. In my graph DB I have 2 types of nodes: person fruit person nodes may be connected with each other with relation friend person nodes are connected with the nodes of fruits if they like that fruit. I want to find the set of group of 3 people who likes for example apple peach and orange and there is at least the path from one person to 3rd with relation "friend", or all 3 are friends. Since I have started using neo4j just recently, I need Guru's help to come up