lxiongh / lxiongh.github.io

0 stars 1 forks source link

Neo4j 基础使用方法 #6

Open lxiongh opened 7 years ago

lxiongh commented 7 years ago
lxiongh commented 7 years ago

从 CSV 中导数据

neo4j-import

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

Super CSV

http://super-csv.github.io/super-csv/examples_writing.html

查询几度邻居

MATCH (n:Person { name: 'Ann' })-[:KNOWS*1..3]-(neighbors) RETURN n, collect(DISTINCT neighbors)

Recommend

Pattern matching can be used to make recommendations. Johan is learning to surf, so he may want to find a new friend who already does:

MATCH (js:Person)-[:KNOWS]-()-[:KNOWS]-(surfer)
WHERE js.name = "Johan" AND surfer.hobby = "surfing"
RETURN DISTINCT surfer

PROFILE 可以验证 Cypher 语句的效率 image