我已经使用Nigel Small的xml2graph
转换器将xml文件转换为cypher查询。结果,有一些空白节点作为xml格式的继承。 CYPHER查询是这样的(对于长篇文章感到抱歉):
CREATE
(N0),
(N1 {publicationDate:"2007-12-18",
title:"RECONHECIMENTO E AGRUPAMENTO",`title language`:"por"}),
(N2),
(N3 {name:"RG"}),
(N4 {name:"SWMS"}),
(N5 {name:"MHLBB"}),
(N6 {name:"RNM"}),
(N7 {publicationDate:"2007-12-18",title:"LOCPN",`title language`:"por"}),
(N8),
(N9 {name:"MFCS"}),
(N10 {name:"DGG"}),
(N11 {name:"GCB"}),
(N12 {name:"CTS"}),
(N13 {name:"JACF"}),
(N14 {name:"MCP"}),
(N15 {name:"RMCA"}),
(N16 {publicationDate:"2007-12-18",
title:"CCONTEXTOGRAD",`title language`:"por"}),
(N17),
(N18 {name:"JB"}),
(N19 {name:"RH"}),
(N20 {name:"SR"}),
(N21 {name:"SCCP"}),
(N22 {name:"DNFB"}),
(N23 {publicationDate:"2008-04-18",
title:"GENETICOL",`title language`:"por"}),
(N24),
(N25 {name:"AGDC"}),
(N26 {name:"GAA"}),
(N27 {name:"MN"}),
(N28 {name:"RDL"}),
N0-[R0:record]->N1,
N1-[R1:authors]->N2,
N2-[R2:author]->N3,
N2-[R3:author]->N4,
N2-[R4:author]->N5,
N2-[R5:author]->N6,
N0-[R6:record]->N7,
N7-[R7:authors]->N8,
N8-[R8:author]->N9,
N8-[R9:author]->N10,
N8-[R10:author]->N11,
N8-[R11:author]->N12,
N8-[R12:author]->N13,
N8-[R13:author]->N14,
N8-[R14:author]->N15,
N0-[R15:record]->N16,
N16-[R16:authors]->N17,
N17-[R17:author]->N18,
N17-[R18:author]->N19,
N17-[R19:author]->N20,
N17-[R20:author]->N21,
N17-[R21:author]->N22,
N0-[R22:record]->N23,
N23-[R23:authors]->N24,
N24-[R24:author]->N25,
N24-[R25:author]->N26,
N24-[R26:author]->N27,
N24-[R27:author]->N28
=============================
当我尝试使用co-autorship关系创建图表时,我发出了这个查询:
START title=node:node_auto_index('title:*'), author = node:node_auto_index('name:*')
MATCH a-[:author]->title<-[:author]-b
CREATE UNIQUE a-[coaut:coautores]-b
在neo4j控制台上,但输出显示没有其他关系,数据库没有改变,虽然语法没问题。我想知道原因是来自xml(记录,记录,作者)的空白节点。有什么方法可以解决这个问题吗?原始文件很大,因此手动校正是不可行的。我应该删除这些节点及其关系吗? Obrigado,谢谢!