我有一个数据库,我创建了以下代码。
LOAD CSV WITH HEADERS FROM 'FilmData.csv' AS line
MERGE (n:Movie{title:line.Film_Adi_TR,yabanci_isim:coalesce(line.Film_Adi_Yabanci,"Yabancı İsim Yok"),released:line.Vizyon_Tarihi,numberOfAudience:line.Seyirci_Sayisi,TotalRevenue:line.Toplam_Hasilat,IMDb:line.IMDb,Screening_Week:line.Gosterim_Hafta,CountryOfManufacture:line.Yapimci_Ulke})
WITH n, split(line.Yapimci,",") as manufacturers, split(line.Yonetmen,",") as directors,split(line.Film_Turu,",") as genres,split(line.Oyuncular,",") as players
UNWIND manufacturers as m
UNWIND directors as d
UNWIND genres as g
UNWIND players as p
MERGE (y:Yapimci{title: m})
MERGE (yntmn:Yonetmen{title: d})
MERGE (gnrs:Film_Turu{title: g})
MERGE (o:Oyuncular{title: p})
MERGE (n)-[:Yapımcı]->(y)
MERGE (n)-[:Yönetmen]->(yntmn)
MERGE (n)-[:FilmTürü]->(gnrs)
MERGE (n)-[:Oyuncusu]->(o)
字符串
我想列出由同一导演执导的电影,但我得到一个错误。你能帮助我吗?
match (n:Yonetmen)
where n.title="Stephen King"
match n-[:WRITE]->Movie
return Movie
型
Neo.ClientError.Statement.SyntaxError Invalid input 'n':expected“(“,“ALL”,“ANY”or“SHORTEST”(line 3,column 7(offset:54))“match n-[:WRITE]->Movie”^
我是Neo4j的新手,我无法解决这个问题。
1条答案
按热度按时间k5ifujac1#
你必须在匹配中的节点周围加上括号,所以它应该像这样:
字符串