neo4j

NEO4J Cypher Query: Relationship Direction Bug in Where Clause

 ̄綄美尐妖づ 提交于 2019-12-10 09:43:56
问题 Sample Data: Sample Query CREATE (a1:A {title: "a1"}) CREATE (a2:A {title: "a2"}) CREATE (a3:A {title: "a3"}) CREATE (b1:B {title: "b1"}) CREATE (b2:B {title: "b2"}) MATCH (a:A {title: "a1"}), (b:B {title: "b1"}) CREATE (a)-[r:LINKS]->(b) MATCH (a:A {title: "a2"}), (a1:A {title: "a1"}) CREATE (a)-[:CONNECTED]->(a1) MATCH (a:A), (b:B) return a,b Objective: Finding some connections in the where clause Now lets write some variations to find A's not directly connected to B (a2 and b3) // Q1. Both

Slow performance bulk updating relationship properties in Neo4j

孤者浪人 提交于 2019-12-10 09:33:30
问题 I'm struggling to efficiently bulk update relationship properties in Neo4j. The objective is to update ~ 500,000 relationships (each with roughly 3 properties) which I chunk into batches of 1,000 and processing in a single Cypher statement, UNWIND {rows} AS row MATCH (s:Entity) WHERE s.uuid = row.source MATCH (t:Entity) WHERE t.uuid = row.target MATCH (s)-[r:CONSUMED]->(t) SET r += row.properties however each batch of 1,000 nodes takes around 60 seconds. There exists an index on UUID property

Neo4j license limitations? [closed]

你说的曾经没有我的故事 提交于 2019-12-10 09:28:23
问题 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 4 years ago . Please tell me, are there limitations of maximum records per node within Basic license? For example i can store only max 10M records per Basic license? Or record count is unlimited by Basic license? Thank you! 回答1: There's no size limitations on any version. There once was, and that information is still floating

Database-level validation of Neo4j

爷,独闯天下 提交于 2019-12-10 09:22:15
问题 I am using Neo4j as my graph database. Suppose I want to limit the length of User's name field to be less then 10, is there any way to impost such constraint on the database level? 回答1: Right now you'd have to do that either on application level, or by registering a transaction-commit hook that checks that property-field for a certain criterium. See: http://docs.neo4j.org/chunked/stable/transactions-events.html http://api.neo4j.org/2.0.3/org/neo4j/graphdb/event/TransactionEventHandler.html 来源

Starting first node in Heo4j HA cluster fails even when allowed to create cluster

孤者浪人 提交于 2019-12-10 09:21:26
问题 Whilst trying to diagnose a different issue with my cluster I tried isolating my environments to force elections events. When starting nodes in isolation though my app failed to start with this exception: Caused by: java.util.concurrent.TimeoutException: null at org.neo4j.cluster.statemachine.StateMachineProxyFactory$ResponseFuture.get(StateMachineProxyFactory.java:300) ~[neo4j-cluster-2.0.1.jar:2.0.1] at org.neo4j.cluster.client.ClusterJoin.joinByConfig(ClusterJoin.java:158) ~[neo4j-cluster

Neo4j.rb create unique relationship

做~自己de王妃 提交于 2019-12-10 09:02:26
问题 Here is my Neo4j Active Node class User include Neo4j::ActiveNode has_many :out, :following, type: :following, model_class: 'User' end john = User.find(:name => "John") tom = User.find(:name => "Tom") # create following relationship john --> tom john.following << tom # check count john.following.count #=> 1 # again create the relationship john.following << tom # again check count john.following.count #=> 2 I want to create unique relationship. To avoid duplication we have to use create unique

spring-data-neo4j basic one-to-many relationship not persisting

被刻印的时光 ゝ 提交于 2019-12-10 06:28:28
问题 EDIT : Sample project available on github. I'm using Neo4J (Rest graph database, hosted in grapheneDb) and Spring Data in our backend project. <bean id="graphDatabaseService" class="org.springframework.data.neo4j.rest.SpringCypherRestGraphDatabase"> I have a simple one-to-many relationship between two entities: User and Stay . EDIT : I thought this wasn't relevant for the issue, but after seeing a similar problem in SDN4, I think I need to update the question (there is a basic @NodeEntity

What is the fully qualified path of the Neo4j data directory on Ubuntu 12.04?

十年热恋 提交于 2019-12-10 00:55:11
问题 I can't find the data directory for my Neo4j Enterprise installation. I have looked at the config files and understand that it is in the data/graph.db file. What is the default fully qualified path of the neo4j data directory? 回答1: The fully qualified path to the Neo4j 2.0M6 data directory on Ubuntu 12.04 is '/var/lib/neo4j/data' The path is also shown at the bottom of the 'Database Information' panel in the Neo4j Browser. 来源: https://stackoverflow.com/questions/20083966/what-is-the-fully

neo4j企业版集群搭建

a 夏天 提交于 2019-12-09 19:30:14
一、HA高可用集群搭建 版本采用的是 neo4j-enterprise-3.5.3-unix.tar.gz 1.1、集群ip规划 192.168.56.10 neo4j-node1 192.168.56.11 neo4j-node2 192.168.56.12 neo4j-node3 192.168.56.13 neo4j-node4 192.168.56.14 neo4j-node5 1.2、免密登录配置 $ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa #生成秘钥 $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys #cp公钥到验证文件中 $ chmod 0600 ~/.ssh/authorized_keys 如上做免密登录,这里只做了neo4j-node1 免密登录其他节点 这里做不做免密,都可以,我做免密主要是为了方便,不需要一直输入密码,在正式环境中还是不用免密的好 1.3、修改主机名配置 /etc/hosts 配置 192.168.56.10 neo4j-node1 192.168.56.11 neo4j-node2 192.168.56.12 neo4j-node3 192.168.56.13 neo4j-node4 /etc/sysconfig/network 配置 hostname

How to generate Index and Constraint script for Neo4j store using Liquigraph in java?

只愿长相守 提交于 2019-12-09 18:33:53
问题 I am trying to generate the Index and Constraint for my spring entities. I am not using any capability of spring-data to do it such as indexes.auto=assert . How can I generate the scripts with following conditions I need to generate scripts in offline mode. ie I cannot provide any Neo4j server,user,password etc. I need to use the java api to achieve it. I am able to create liquigraph change-log but I can't find a way to generate the script. The maven dependency I have used is <!-- https:/