neo4j

Neo4j create nodes and relationships from pandas dataframe with py2neo

南楼画角 提交于 2020-01-12 05:33:20
问题 Getting results on a pandas dataframe from a cypher query on a Neo4j database with py2neo is really straightforward, as: >>> from pandas import DataFrame >>> DataFrame(graph.data("MATCH (a:Person) RETURN a.name, a.born LIMIT 4")) a.born a.name 0 1964 Keanu Reeves 1 1967 Carrie-Anne Moss 2 1961 Laurence Fishburne 3 1960 Hugo Weaving Now I am trying to create (or better MERGE) a set of nodes and relationships from a pandas dataframe into a Neo4j database with py2neo. Imagine I have a dataframe

Neo4j Fast way to match fuzzy text property

主宰稳场 提交于 2020-01-12 05:28:07
问题 I have a reasonable number of nodes (roughly 60,000) (:Document {title:"A title"}) Given a title, I want to find the matching node, if it exists. The problem is that the title I'm given is not consistent. That is, sometimes the beginning of a new word is Capital, sometimes it is all lower case. Sometimes Key-Words are combined with Kebab case, sometimes they are written normally as key words. To compensate for that I use apoc and the Levenshtein distance between the given title and every node

Cypher query JSON formatted result

别等时光非礼了梦想. 提交于 2020-01-12 03:37:08
问题 On the Actor/Movie demo graph, cypher returns column names in a separate array. MATCH (n:Person) RETURN n.name as Name, n.born as Born ORDER BY n.born LIMIT 5 results: { "columns" : [ "Name", "Born" ], "data" : [ [ "Max von Sydow", 1929 ], [ "Gene Hackman", 1930 ], [ "Richard Harris", 1930 ], [ "Clint Eastwood", 1930 ], [ "Mike Nichols", 1931 ] ]} Is it possible to get each node properties tagged instead? { "nodes" : [ ["Name": "Max von Sydow", "Born": 1929 ], ...] } If I return the node

Neo4j: Best way to batch relate nodes using Cypher?

﹥>﹥吖頭↗ 提交于 2020-01-11 12:54:05
问题 When I run a script that tries to batch merge all nodes a certain types, I am getting some weird performance results. When merging 2 collections of nodes (~42k) and (~26k), the performance is nice and fast. But when I merge (~42) and (5), performance DRAMATICALLY degrades. I'm batching the ParentNodes (so (~42k) split up in batches of 500. Why does performance drop when I'm, essentially, merging less nodes (when the batch set is the same, but the source of the batch set is high and the target

Neo4j linked list - multiple nodes

﹥>﹥吖頭↗ 提交于 2020-01-11 12:53:07
问题 I'm working on understanding how to use linked lists to improve performance and create activity feeds on Neo4j.. Still working on learning Cypher, so I have a question.. I've found some examples of linked lists, but I need lists with bigger examples to finally put all the pieces together in my head.. I've used this code from grepcode and have found it to be more helpful than the example in the Neo4j manual. Yet I'm still a bit confused.. Can someone modify it to have say seven nodes with

Constructing a map doesn't permit indexed collection as map key?

喜夏-厌秋 提交于 2020-01-11 07:19:38
问题 So I'm trying to actually write an answer to this question which seemed like an interesting one to me. What the hell, I'll give it a shot. Here's the solution I came up with. It seems correct to me, and should yield the right result, but instead yields a cypher parse error. So the game here is to take two collections (letters and numbers) and to construct a map out of them which maps the right letter to the right number, sequentially from the two collections. My solution: with [1,2,3] as nums

WebSocket connection failure. Due to security constraints in your web browser

佐手、 提交于 2020-01-11 04:01:12
问题 Today I download neo4j-community-3.2.0 in windows, when i start the server, i meet one problem in browser, i meet this problem in neo4j-community-3.1.2 and i had solved it by Ticking the "Do not use Bolt" option in settings solved the issue. But in neo4j-community-3.2.0 , i can't see "Do not use Bolt" option ,and i don't know how to do. N/A: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please

TinkerPop集成Neo4j

南楼画角 提交于 2020-01-11 01:57:15
简介 ThinkerPop是由Apache开发,面向实时事务处理(OLAP)以及批量、分析型(OLTP)的开源图计算框架。TinkerPop可以应用于不同图数据库的抽象层,避免应用程序与特定数据库高度依赖。Tinkerpop提供的通用API、Gremlin语言和工具,使开发人员可以基于不同图数据库轻松创建图形应用程序,使图数据库与图计算解耦,方便切换不同图形数据库,简化其工作。 TinkerPop是不同图形数据库和不同图形处理器上的抽象层 。作为抽象层,TinkerPop提供了一种避免供应商锁定特定数据库或处理器的方法。这一功能为开发人员提供了巨大的便利。另外,如果使用JanusGraph的话,也建议多了解Tinkerpop,因为JanusGraph 正是基于Tinkerpop 这个框架来开发的。Tinkerpop虽然是一个图计算框架,但是配合TinkerGraph也是可以作为图数据库使用的。 Tinkerpop体系结构图 目前,图数据库市场仍处于百家争鸣的时代,各家的查询语言也不尽相同,Neo4j的Cypher、JanusGraph脱胎于Tinkerpop的Gremlin、TigerGraph的GSql等。如果说未来可能有一个标准的话,应该说Gremlin是最大的可能,截止到今天,Gremlin已经被JanusGraph、GraphDB等产品兼容。关于Tinkerpop的更多信息

Is there an easy GUI-based way to build graphs in neo4j? [closed]

↘锁芯ラ 提交于 2020-01-10 09:57:26
问题 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 2 years ago . Is there a GUI-builder for neo4j? I want to be able to quickly add new nodes, set labels, set properties and relationships all in a gui-environment by clicking on nodes in a visualisation. I have searched, but have found nothing. Thanks. 回答1: @Zuriar Two years after your original post :) but nevertheless .. Now

neo4j finding all paths that meets a certain criteria

て烟熏妆下的殇ゞ 提交于 2020-01-10 05:24:46
问题 I am trying to model a graph to solve some connection time problem. So for example I have the following graph F1,F2 F3 F4 ST_B--------->ST2----->ST3------>ST_E F5,F6 F7 F8 ST_B-------->ST4---->ST5------>ST_E F9 ST_B-------->ST_E I model ST_B, ST2,ST3,ST4,ST5, ST_E as station (node). and F1-F9 as flt node. And each flt node has a departure time and arrival time. And the relationship is connect. Also in this case, let's assume F2 arrival time is 30mins less than F3 departure time, and F6 is