neo4j

Naming convention for bidirectional relationships in Neo4j (using Spring Data)

感情迁移 提交于 2019-12-06 15:58:37
I need some advice to give name to relationships. Plus, I'm not sure on how I have to annotate my domain entities with spring data. Most of examples that I've seen are unidirectional and the name chosen are pretty straightforward. Supose the following example: @NodeEntity public class Person { @Indexed private String name; @RelatedTo(type="OWNS", direction=Direction.OUTGOING) private Set<Car> cars; } The relationship name seems ok, no problem. Now suppose that I want to make this relationship bidirectional. What are the differences (and the pros/cons) of the following approaches. 1) Make both

Setting up NEO4j in Symfony2

牧云@^-^@ 提交于 2019-12-06 15:52:47
I am new to Symfony and have started reading and toying about. I was able to install Symfony2 and a NEO4j database. I was also able to include bootstrap into my Symfony project and display a basic homepage. I would now like to connect my project to the database. I would like to start with basic functionallity such as registration and user system. I am currently using following (installed via composer): "everyman/neo4jphp": "dev-master", "hirevoice/neo4jphp-ogm": "dev-master", "klaussilveira/neo4j-ogm-bundle": "dev-master" These should give me the functionality I need. I have then created a

neo4j : Cannot perform data updates in a transaction that has performed schema updates

我与影子孤独终老i 提交于 2019-12-06 15:23:56
Hi I am getting following error while saving NodeEntity object by using Neo4jTemplate Cannot perform data updates in a transaction that has performed schema updates Spring-data :- <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>3.1.0.BUILD-SNAPSHOT</version> Neo4j Version : 2.X Service :- @Override @Transactional public void addRepository(Repository repository) { template.save(repository); } Caused by: org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException: Cannot perform data updates in a transaction that has performed schema

centos下neo4j安装和设置开机自启动.

我是研究僧i 提交于 2019-12-06 14:43:43
centos下neo4j安装和设置开机自启动. 1. 资源准备 CentOS 7.4 jdk 1.8+ neo4j-community-3.5.13 https://neo4j.com/artifact.php?name=neo4j-community-3.5.13-unix.tar.gz 2. 安装neo4j 安装jdk1.8(略) 上传neo4j安装包到服务器/opt目录下,并解压 tar -zxvf neo4j-community-3.5.13-unix.tar.gz 修改neo4j配置文件 conf/neo4j.conf,只需要修改使neo4j可以外网访问即可,其他按默认配置,大概70行左右,找到配置去掉前面的“#” dbms.connectors.default_listen_address=0.0.0.0 进入neo4j安装程序bin目录,启动neo4j ./neo4j start 到页面浏览 http://localhost:7474。如果出现页面表示neo4j安装成功,初始化账号密码为neo4j/neo4j 3. 设置neo4j开机启动 进入neo4j安装目录,并创建脚本start.sh和stop.sh,其中JAVA_HOME按照自己的实际路径填写 vim start.sh #!/bin/bash export JAVA_HOME=/opt/jdk1.8.0_161

Testing Neo4j managed extensions

蓝咒 提交于 2019-12-06 14:34:06
I've written a server extension for Neo4j, following the guidelines at http://neo4j.com/docs/stable/server-plugins.html . I wrote unit tests for some of the internal methods, but I would also like to test the REST interface if possible. http://neo4j.com/docs/stable/_testing_your_extension.html seems to only show how to test unmanaged extensions, but I'm looking for something closely analogous to that for managed extensions. Any pointers? I do know how to load the extension into a server and query it with curl (as follows), but when things go wrong it's not a fun debug cycle. curl -X POST -v

Unable to create elasticsearch index from neo4j

梦想的初衷 提交于 2019-12-06 14:26:40
I want to create elastic search indexes on neo4j data. I reffered https://github.com/neo4j-contrib/neo4j-elasticsearch and https://www.youtube.com/watch?v=SJLSFsXgOvA&ab_channel=AnmolAgrawal to create elasticsearch index from neo4j. But after that, im getting below error in neo4j.log file. 2016-11-08 12:20:09.825+0000 WARN Error updating ElasticSearch No Server is assigned to client to connect io.searchbox.client.config.exception.NoServerConfiguredException: No Server is assigned to client to connect at io.searchbox.client.AbstractJestClient$ServerPool.getNextServer(AbstractJestClient.java:132

neo4j-学习笔记

倖福魔咒の 提交于 2019-12-06 14:23:21
neo4j学习-基础语法 CREATE 创建节点和关系。 节点:用以表示一条数据记录,在Neo4j中节点可以有多个属性和多个标签。 关系:就是用来连接两个节点。关系和节点一样可以包含多个属性,关系也称为图论的边(Edge),其始端和末端都必须是节点,两头不能为空,即关系不能指向空,也不能从空发起。 create() 创建一个节点,表示为一个对象 CREATE(starwars:Movice{name:'star wars',released:'1999',content:'alien fight'}) create(n),(m),创建多个对象 CREATE(zhangsan:Person{name:'zhang san',age:'18',hobby:'moive'}),(lisi:Person{name:'li si',age:'16',hobby:'moive'}) 创建一个关系 create(zhangsan)-[:like]->(starwars) 多个对象对单个对象建立关系,必须要写一起吗? create(zhangsan)-[:like]->(starwars),(lisi)-[:like]->(starwars) match() 查询节点对象 1.根据属性查询指定对象 match(person:Person{name:'zhang san'}) return

How to use custom self signed certificates in Neo4j (instead of snakeoil.cert)?

ε祈祈猫儿з 提交于 2019-12-06 14:05:25
Recently I ran into the problem of generating a custom certificate that does not bind to 0.0.0.0 in Neo4j. It turns out that Neo4j - in contrast to the documentation - expects DER certificates for both the public and private key. I will post lessons learned in respons to this question. Rob sudo vi /etc/neo4j/neo4j-server.properties uncomment org.neo4j.server.webserver.address=0.0.0.0 check: org.neo4j.server.webserver.https.enabled=true check: org.neo4j.server.webserver.https.port=7473 change: org.neo4j.server.webserver.https.cert.location=/var/ssl/neo4j/server.crt change: org.neo4j.server

java.lang.ClassNotFoundException Every time I change something in my code (Neo4j OGM + Play!)

孤者浪人 提交于 2019-12-06 13:53:38
问题 Im using Neo4J OGM + Play Framework since 2 weeks succesfully, but today it doesn't work anymore. Every time I change something in my code, no matter if in a NodeEntity Class or in any other Class, it causes a java.lang.ClassNotFoundException when I try to get something from the database using the find method from org.neo4j.ogm.session.Session. Only if I clear the database and refill it I'm able to insert and get my NodesEntities. Java version: 1.8 Scala version: 2.11.7 Sbt version: 2.6.3

Neo4j: Filter nodes based on aggregate function

此生再无相见时 提交于 2019-12-06 13:42:23
Suppose I have a list of customer nodes and a list of orders each customer has placed represented as order nodes associated to these customer nodes. Each order has a cost numeric property associated to it. I want to return those customers, whose average order is greater than a threshold. Here is some non-functioning code that exemplifies what I want: MATCH (n0:Customer)-[]-(n1:Order) WITH n1.cost as cost WHERE avg(cost) > 300 RETURN n0, avg(cost) But of course this is not quite right. How should I go about it? What you have is close, you just need to do the aggregation in the WITH statement,