neo4j

How to enlist XAResource with existing Transaction?

ⅰ亾dé卋堺 提交于 2019-12-21 21:37:41
问题 My use case is: I have an existing JTA TransactionManager and a Transaction in-flight. I'd like to enlist Neo4j as an XAResource in this Transaction such that it may prepare/commit in proper 2PC. I'm not seeing a public XAResource implementation in Neo4j; everything seems to be routed through the NioNeoDbPersistenceSource > NeoStoreXaDataSource > NeoStoreXaConnection.NeoStoreXaResource. Is there a preferred way to enlist Neo4j in JTA Transactions outside those provided by its own

possible to connect to multiple neo4j databases via bulbs/Rexster?

大兔子大兔子 提交于 2019-12-21 21:23:51
问题 I would like to be able to specify the neo4j (2.0+) database folder when I open a connection to a graph using bulbs. The goal is to be able to open different or multiple neo4j databases (folders in data/) on the same machine without starting the neo4j server. This works with the Gremlin console. I suspect the route to doing this with bulbs would be to use the bulbs Rexster client (http://bulbflow.com/docs/api/bulbs/rexster/client/) and somehow automatically start a Rexster server pointing to

Deploy a Procedure to Neo4J when using the embedded driver

一曲冷凌霜 提交于 2019-12-21 20:08:59
问题 I have some logic which needs direct node access to neo4j but the rest of the app using Spring Data Neo4j (SDN) for simplicity. I thought to use a procedure with @Procedure, but I'm not sure how to use that procedure when using the neo4j embedded driver and SDN4. My configuration is very barebones as below: @Configuration @EnableNeo4jRepositories(basePackages = "recommender.repository") @ComponentScan(basePackages = "recommender") @EnableTransactionManagement public class MyNeo4jConfiguration

Neo4J huge performance degradation after records added to spatial layer

怎甘沉沦 提交于 2019-12-21 19:56:53
问题 So I have around 70 million spatial records that i want to add to the spatial layer (I've tested with a small set and everything is smoothly, queries returning the same results as postgis and the layer operation seems fine) But when i try to add all the spatial records to the database, the performance degrades rapidly to the point that it gets really slow at around 5 million (around 2h running time) records and hangs at ~7.7 million (8 hours lapsed). Since the spatial index is an Rtree that

how to avoid deadlocks with neo4j

泄露秘密 提交于 2019-12-21 17:27:33
问题 I just learnt that when I create a relationship between 2 nodes in neo4j, both of them are locked (http://docs.neo4j.org/chunked/stable/transactions-locking.html). However, in our project, we have elements that we can instanciate and we finnaly have two nodes in the graph linked by a "INSTANCE_OF" relationship. For exemple if I instanciate element B, I have a new element B1. They are stored in the graph like B<-INSTANCE_OF-B1. My problem is that many users can instanciate element B on same

Neo4j directed path through multiple relationships with property filter

て烟熏妆下的殇ゞ 提交于 2019-12-21 17:22:26
问题 Being new to Cypher and Neo4j, I am having trouble constructing my query for my use-case. I am building a simple ACL (access control list) and am looking for a path through permission relationships an up a hierarchy as well. A picture may better explain it: Key: Users -> Blue Groups -> Yellow, Green Resource Tree -> Red Now I want to see if a path exists from Bob to the eVar 33 resource where Bob has update access. Because there is a direct path, I can get what I am looking for by running

Neo4J database size / shrinking

倖福魔咒の 提交于 2019-12-21 17:19:42
问题 We have a neo4j database with ~10Mil nodes and ~300 million relationships. the database has grown to about 80 Gig. There are daily jobs that kill off old data and add new data, so the approx number of nodes and relationships stays fairly constant. However, the physical file size of the db files keeps on growing (for example, the relationshipstore file is at 50Gig currently). I have found the following link that might explain why the size might not go down when deleting (space is left reserved

Use neo4j in android device

╄→гoц情女王★ 提交于 2019-12-21 14:03:23
问题 I am trying to create a database in my android device with NEO4J. But the application crashes. String extStorageDirectory = Environment.getExternalStorageDirectory().toString(); GraphDatabaseService graphDB=new GraphDatabaseFactory().newEmbeddedDatabase(extStorageDirectory); I have added permissions for writing to external storage. What may be the reason? Is it at all possible to create a neo4j database in Android device? 回答1: The news to which Michael alluded has just come out: Neo4j Mobile

Neo4j的安装以及和java的连接

南楼画角 提交于 2019-12-21 11:59:28
Neo4J的安装配置以及java连接 Neo4j是一个高性能的,NoSQL图形数据库,在一个图中包含两种基本的数据类型:Nodes(节点) 和 Relationships(关系)。Nodes 和 Relationships 包含key/value形式的属性。Nodes通过Relationships所定义的关系相连起来,形成关系型网络结构。 相比其他NoSQL数据库,Neo4j的特点在于可以建立关系,达到数据关联的目的。从某些方面来说,我觉得它甚至可以取代关系型数据库,而且不需要事先定义表结构,字段扩展非常方便。 安装、配置、启动Neo4j 官网下载地址:https://neo4j.com/download-center/#community 1、选择社区版——>选择windows下的zip安装包——>解压 2、保证自己已经安装JDK8 3、以管理员身份启动CMD,切换路径到解压后目录下的bin内,验证neo4j的安装和环境变量配置是否成功: neo4j.bat console 4、注册neo4j服务: neo4j install-service 5、开启neo4j服务 neo4j start 关闭 重启: neo4j stop neo4j restart 6、输入:http://localhost:7474/browser,访问 默认的初始密码是neo4j,第一次登陆时需要修改密码

Neo4j Importing local CSV File

情到浓时终转凉″ 提交于 2019-12-21 09:19:38
问题 I'm trying to import a local csv file but I have got InvalidSyntax Error. LOAD CSV WITH HEADERS FROM file:C:/csv/user.csv Invalid input '/' (line 1, column 35 (offset: 34)) "LOAD CSV WITH HEADERS FROM file:C:/csv/user.csv" 回答1: You need to put the filename in quotes, and add a few more slashes: LOAD CSV WITH HEADERS FROM "file:///C:/csv/user.csv" Full documentation here. 回答2: The command below will return the first 5 lines of your CSV file: LOAD CSV WITH HEADERS FROM "file:///<PATH_TO_YOUR