Neo4j如何为动态属性键创建属性集而不是重复值列表

Neo4j如何为动态属性键创建属性集而不是重复值列表,neo4j,cypher,Neo4j,Cypher,比如说 MATCH (p:Product{item_sku_id:'123'}) MERGE (p)-[:has_attribute]->(ea:ExAttrs) with ea match (ea) where none(x IN coalesce(ea.testAttr,[]) WHERE x = $ext_attr_value) set ea.testAttr=coalesce(ea.testAttr+[$ext_attr_value], $ext_attr_value) 如果我想

比如说

MATCH (p:Product{item_sku_id:'123'})
MERGE (p)-[:has_attribute]->(ea:ExAttrs)
with ea
match (ea) where none(x IN coalesce(ea.testAttr,[]) WHERE x = $ext_attr_value)
set ea.testAttr=coalesce(ea.testAttr+[$ext_attr_value], $ext_attr_value)
如果我想用csv文件执行上述密码,并且我想替换
testAttr
作为参数。我应该如何实施它?有人能帮我吗?非常感谢

这应该行得通

MATCH (p:Product{item_sku_id:'123'})
MERGE (p)-[:has_attribute]->(ea:ExAttrs)
with * where not $ext_attr_value IN ea.testAttr
set ea.testAttr=coalesce(ea.testAttr,[]) + $ext_attr_value