neo4j

Batch Insertion with Neo4j

末鹿安然 提交于 2019-12-10 14:29:26
问题 I am importing 2.3 Billion relationship from a table, The import is not very fast getting a speed on 5Million per hour that will take 20 days to complete the migration. I have heard about the neo4j batch insert and and batch insert utility. The utility do interesting stuff by importing from a csv file but the latest code is some how broken and not running. I have about 100M relations in neo4j and I have to all check that there shall be no duplicate relationship. How can I fast the things in

Java heap space error neo4j

*爱你&永不变心* 提交于 2019-12-10 14:28:03
问题 I've just setup neo4j 2.1.3 community for the first time and I run into a java heap space OutOfMemoryError when trying to load a dataset of about 17M. I'm working on a Mac with 16GB memory and OS X 10.9.4 java version 1.7.0_21 and I tried increasing the heap size via the command line with: java -Xmx2048m Problem is that the jvm doesn't seem to recongize this. I'm not experienced in setting java settings this way. Any suggestions? 回答1: You can change settings of JVM heap in configuration file

Neo4j over bolt protocol has very high latency

人盡茶涼 提交于 2019-12-10 13:43:45
问题 I'm using Neo4j for a project using the official Neo4j driver for .NET found here: https://www.nuget.org/packages/Neo4j.Driver This driver works over the bolt protocol, my assumption being that a specialized binary protocol would be more efficient than the HTTP API. But ever since the start of the project, I've noticed relatively high latencies from Neo4j for even very simple operations. Such as a match like the following taking 30-60ms when UserID is an indexed field and the database

neo4j3.0多数库切换

隐身守侯 提交于 2019-12-10 13:39:35
动机 类似与关系型 数据库 ,创建了多个数据库 想要像访问关系型数据库那样来可以无缝切换多个数据库 然而,在 neo4j 3.0 都暂时没有办法做到:每次启动neo4j,它只能读取一个数据库。 比如,现在有两个数据库graph.db,graph2.db。假设neo4j默认的数据库为graph.db,启动neo4j,这时候想要访问graph2.db,必须修改neo4j的配置文件,将数据库改为graph2.db,重启,此时才可以访问graph2.db. 那么,如何可以比较neat地切换数据库呢? 方法 方法一:修改配置文件 这是官方文档方法 大概思路是: 新建一个conf_test文件 修改neo4j.conf: # The name of the database to mount dbms.active_database=graph2.db //你的数据库 将新的neo4j的配置文件的路径设为当前session的环境变量。 重启neo4j 问题 来了,我每次都要先新建一个conf文件夹,修改conf文件,再设置环境变量,据麻烦!!! 方法二:建立graph.db的软连接或者备份【推荐!!!】 不需要修改配置文件,不需要设置环境变量 对于Linux: 首次修改: // 请将$NEO4j_HOME改为你的neo4j的安装路径 cd $NEO4j_HOME/data/databases/

Index on multiple properties in Neo4j / Cypher

ぃ、小莉子 提交于 2019-12-10 13:35:11
问题 Can I create an index with multiple properties in cypher? I mean something like CREATE INDEX ON :Person(first_name, last_name) If I understand correctly this is not possible, but if I want to write queries like: MATCH (n:Person) WHERE n.first_name = 'Andres' AND n.last_name = 'Doe' RETURN n Does these indexes make sense? CREATE INDEX ON :Person(first_name) CREATE INDEX ON :Person(last_name) Or should I try to merge "first_name" and "last_name" in one property? Thanks! 回答1: Indexes are good

Which jars exactly are needed to embed Neo4j?

僤鯓⒐⒋嵵緔 提交于 2019-12-10 13:31:13
问题 EDIT This question is not about how to solve dependencies using Ant / Maven / Gradle or whatnots. I'm trying to use Neo4j and I'm a bit confused by the docs as to what I need to embed a very simple "Hello, world!" Neo4j example in an app. I've read in several places that Neo4j was lightweight and that only one (and now two) jars where needed. For example here: http://highscalability.com/neo4j-graph-database-kicks-buttox we can read: "Small footprint. Neo4j is a single <500k jar with one

How to retrieve nodes for multiple depth relationships Neo4j Database Cypher?

丶灬走出姿态 提交于 2019-12-10 13:25:39
问题 Assuming that there is a simple graph as follows, (City {name:gotham})<-[:LOCATED]-(Tower {name:abc})<-[:LOCATED]-(Bank:{name:CityBank}) (City {name:gotham})<-[:LOCATED]-(Cinema {name:MainHall}) (City {name:gotham})<-[:LOCATED]-(Bank {name:ComBank}) How can i get all banks located in City named Gotham in Neo4j Database (including CityBank and comBank)? I tried following pattern, it returned all the nodes LOCATED in City named gotham (Including Cinema as well) MATCH (City{name:'Gotham'})<--

Unable to establish a neo4j - bolt driver connection in javascript

无人久伴 提交于 2019-12-10 13:11:24
问题 I am trying to create a connection between my html embedded javascript and my neo4j database by running the index.html in Chrome. I have reduced the source of the problem to 'neo4j' not being recognised. So the error thrown will be of the type: Cannot read property ['driver'/'basic'/etc...] of undefined. In this case I have assumed that 'undefined' is referring to 'neo4j', which would mean that I am not implementing 'neo4j-web.min.js' correctly. The below block of code is extracted from my

Is it possible to constraint edge multiplicity in Neo4j / OrientDB?

妖精的绣舞 提交于 2019-12-10 13:09:59
问题 I was wondering whether Neo4j and OrientDB provide the possibility of defining constraints in terms of multiplicity for specific edge types? 回答1: For OrientDB You can set multiplicity on out/in collection per label. Example to set maximum 1 edges from Person to Company if the edge's label is "workFor": ALTER PROPERTY Person.out_workFor NOT NULL ALTER PROPERTY Person.out_workFor MAX 1 You can also set the minimum with: ALTER PROPERTY Person.out_workFor MIN 1 In this way with min & max it's

How to access and mutate node property value by the property name string in Cypher?

左心房为你撑大大i 提交于 2019-12-10 12:42:35
问题 My goal is to access and mutate a property of a node in a cypher query where the name of the property to be accessed and mutated is an unknown string value. For example , consider a command: Find all nodes containing a two properties such that the name of the first property is lower-case and the name of the latter is the upper-case representation of the former. Then , propagate the value of the property with the lower-case string name to the value of the property with the upper-case name. The