您知道Neo4j中是否存在"not contains"吗?
例如:
LOAD CSV WITH HEADERS FROM 'file:///animal.csv' as a fieldterminator "|"
match (b:Animals{animal:a.type})
where not a.type contains 'x' or not a.type contains 'abc'
set b.type=a.type
不幸的是,在这种方式下,代码不起作用。
注意,contains区分大小写我也会在比赛前移动WHERE,在那里更便宜
LOAD CSV WITH HEADERS FROM 'file:///animal.csv' as a fieldterminator "|"
WITH a where (not (a.type contains 'x')) or (not (a.type contains 'abc'))
match (b:Animals{animal:a.type})
set b.type=a.type
你确定你想要一个OR而不是and吗?