neo4j

neo4j安装与配置及问题解决(win7 64位)

孤街浪徒 提交于 2019-12-08 05:02:17
安装与配置(win7 64位) 1、Java jdk 8 以上(在这里选用的是jdk 8u171) 安装后配置系统环境,将安装主路径放入系统变量中,(JAVA_HOME=E:\jdk)同时在path中加入%JAVA_HOME%\bin 2、下载neo4j安装包,在此处使用的是neo4j-community-3.4.1-windows.zip, 未使用其提供的desktop, 解压后将主路径放入系统变量中NEO4J_HOME=E:\neo4j\neo4j-community-3.4.1同时将%NEO4J_HOME%\bin添加到path中 3、进入windows命令行,运行neo4j console命令,注意,在这里可能会出现红色的提示和黄色的警告,如图。 若出现黄色警告,那么很可能你是通过win+r, cmd 进入的windows 命令行。在这种情况下,虽然能进入neo4j console 但如neo4j start这样的命令却无法使用。想要解决这个问题,只需要在C:\windows\system32\ 路径下,找到cmd.exe文件,通过右键以管理员身份运行,便可以解决问题。 而红色警告的出现,则可能会导致之后的neo4j install-service命令无法使用,若直接运行会提示出错,在这里的解决方法是通过更改..\bin\neo4j-management路径下的Get

How to import .rdf file in Neo4j database?

亡梦爱人 提交于 2019-12-08 04:57:03
问题 I have a .rdf file which I was used for Dgraph in order to import the data and the subsequently queries in order to get the relations in the Dgraph Ratel UI. Now I need to include in my web application for which Dgraph doesn't have support (link). Hence I started looking for Neo4j. Can anyone please help out how to import .rdf file in Neo4j if not what's the workaround. Thanks. 回答1: Labeled property graph (LPG) and RDF graph are different graph data models, see: RDF Triple Stores vs. Labeled

Cypher 2 not using schema index with OR operator

倾然丶 夕夏残阳落幕 提交于 2019-12-08 04:54:55
问题 Given is the following graph for Neo4j 2.1.7: CREATE (:Application {Name: "Test Application", Aliases: ["Test", "App", "TestProject"]}), (:Application {Name: "Another Application", Aliases: ["A-App", "XYZ", "XYProject"]}), (:Application {Name: "Database X", Aliases: ["DB-App", "DB", "DB-Project"]}), (:System {Name: "Server1", Application: "TestProject"}), (:System {Name: "Server2", Application: "Test Application"}), (:System {Name: "Server3", Application: "another App"}), (:System {Name:

Unexpected null value,neo4j

白昼怎懂夜的黑 提交于 2019-12-08 04:43:15
问题 I don't know why I can't get the value of the movie fields. I debugged it and I found the movie is null. I post a picture and you will see it . Please give me some advice. I am sure I had created the relationship successfully, may somewhere wrong with recommendation. Class or cypher? public interface MovieRepository extends GraphRepository<Movie> { @Query("match (user:User {login: {0}})-[r:RATED]->(movie)<-[r2:RATED]-(other)-[r3:RATED]->(otherMovie) " + " where r.stars >= 3 and r2.stars >= r

how are neo4j caches speeding up queries?

房东的猫 提交于 2019-12-08 04:43:10
问题 I am currently working on a project using neo4j as database and queries that involve some hard relationship discover, and after running performance testing we are having some issues. We have found out that cache is influencing the time of the requests insanely (from 3000ms to 100ms or so). Doing the same request twice would result in one really slow, and the second one much faster. After some searches we saw the warm-up method, that is going to preload all the nodes and relationships in the

Recursive query with sub-graph aggregation

↘锁芯ラ 提交于 2019-12-08 04:32:37
问题 I am trying to use Neo4j to write a query that aggregates quantities along a particular sub-graph. We have two stores Store1 and Store2 one with supplier S1 the other with supplier S2 . We move 100 units from Store1 into Store3 and 200 units from Store2 to Store3 . We then move 100 units from Store3 to Store4 . So now Store4 has 100 units and approximately 33 originated from supplier S1 and 66 from supplier S2 . I need the query to effectively return this information, E.g. S1, 33 S2, 66 I

How to access new neo4j ubuntu/ec2 install?

耗尽温柔 提交于 2019-12-08 04:30:45
问题 I installed neo4j on ec2 and started the service. If I curl http://localhost:7474 from within the remote shell, it returns something positive: { "management" : "http://localhost:7474/db/manage/", "data" : "http://localhost:7474/db/data/", "bolt" : "bolt://localhost:7687" } I opened port 7474 in the security group of my ec2 instance. However when I try to access http://ec2-52-3-253-2.compute-1.amazonaws.com:7474/ in my browser, the site can't be reached. Is there a step I am missing to expose

How do I properly manage a neo4j-community-3.1.0 lucene legacy index? (really weird issues)

穿精又带淫゛_ 提交于 2019-12-08 04:24:35
问题 I am having weird issues with Neo4j's legacy indexing, and got stuck today. I need full text support, as I wish to run a performance comparison against Solr (which uses Lucene full text) to see how the different data model compares. I have been following a few guides online, as well as various posts around here on stack. I had success up until yesterday, where all of a sudden I had corrupted index files, as range queries were returning invalid and inconsistent results. So I am trying to set

How to include properties with NULL values using Neo4j MERGE

北慕城南 提交于 2019-12-08 04:18:57
问题 I have a Node table and an Edge table, both available as CSV files. I managed to load the Node table by: USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM 'file:///NodesETL.csv' AS line CREATE (:InfoNodes {id: toString(line.id), description: toString(line.description)}) This query creates the InfoNodes with the field values of the CSV file as properties of :InfoNodes which is fine. InfoNodes have relationships with other InfoNodes, e.g. these relationships exists between Nodes with the same

Neo4j: Assign unique values to all nodes matching query

大憨熊 提交于 2019-12-08 04:13:38
问题 I want to implement a unique ID property on all nodes in my database but need to apply it to existing data. I'm using Ruby to perform generate the IDS and then running the Cypher query from there. I want to avoid one query to find nodes missing the property, another to set the property on each node individually, since that would require total_nodes + 1 queries. Initially, I was thinking I could do something like this: MATCH (n:`#{label}`) WHERE NOT HAS(n.my_id) SET n.my_id = '#{gen_method}'