neo4j 初级使用笔记

linux下载:

curl -O https://neo4j.com/artifact.php?name=neo4j-community-3.5.6-unix.tar.gz

配置端口:

baidu hd服务器端口配8000以上的

$ vim ./conf/neo4j.conf

# http/https访问
dbms.connectors.default_listen_address=0.0.0.0
dbms.connector.http.listen_address=:8484
dbms.connector.https.listen_address=:8483
# bolt
dbms.connector.bolt.listen_address=:8687

开启/关闭:

$ ./bin/neo4j start
$ ./bin/neo4j restart
$ ./bin/neo4j stop

web server:

http://jp01-ime-uts3-hdp57.jp01.baidu.com:8484/browser/

Username: neo4j

Password: 1234

neo4j与elasticsearch同步

https://neo4j.com/developer/elastic-search/

使用import进行csv文件导入

https://neo4j.com/docs/operations-manual/current/tutorial/import-tool/

https://neo4j.com/docs/operations-manual/current/tools/import/file-header-format/

./bin/neo4j-admin import \
--nodes=" " \
--relationships=" " \
--delimiter="\t" \
--quote="@" \
--ignore-missing-nodes \
--ignore-duplicate-nodes
# csv分隔符为\t
# 实体分割为@
  1. 传入文件名的时候务必使用绝对路径
  2. 使用neo4j-admin import指令导入之前先将原数据库从neo4j_home/data/databases/graph.db/中移除,即指令要求目录下不含数据库,否则指令无法执行
  3. 在执行指令之前务必保证Neo4j处于关闭状态
  4. 写CSV文件的时候务必确保所有的节点的CSV文件的ID fileds的值都唯一、不重复

Algorithm

Recommendation

http://guides.neo4j.com/sandbox/recommendations?_ga=2.223714835.943966535.1560852213-2145298320.1559612652

Others

https://neo4j.com/docs/graph-algorithms/current/introduction/

match (s:PERSON {name: 'Donald Trump'})-[]->(C:PERSON) with C.name as y unwind y as x return x

转载于:https://www.cnblogs.com/bjwu/p/11477190.html

你可能感兴趣的:(neo4j 初级使用笔记)