Neo4j无效的输入'n':应为“(“,“ALL”,“ANY”或“SHORTEST”)

ou6hu8tu  于 2023-11-18  发布在  其他
关注(0)|答案(1)|浏览(367)

我有一个数据库,我创建了以下代码。

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的新手,我无法解决这个问题。

k5ifujac

k5ifujac1#

你必须在匹配中的节点周围加上括号,所以它应该像这样:

match (n:Yonetmen)
where n.title="Stephen King"
match (n)-[:WRITE]->(Movie)
return Movie

字符串

相关问题