using neo4j 2.3 i created a query to find all the nodes that have a relation to tow nodes and create for them a relation to a third node
MATCH (:group{Id:'1'})-->(b:item)<--(:group{Id:'2'} )
, (g:ComboGroup{Id:'(1) AND (2))'})
Create (g)-[:HasItem]->( b)
this query never ends
but when i do return instead
MATCH (:group{Id:'1'})-->(b:item)<--(:group{Id:'2'} )
, (g:ComboGroup{Id:'(1) AND (2))'})
RETURN g, b
i get the proper results with 2709 relationship created
here is the plan i get
now i added a with statement and a limit of to the create and it worked but created 3000 relationships instead of 2709
MATCH (:group{Id:'1'})-->(b:item)<--(:group{Id:'2'} )
, (g:ComboGroup{Id:'(1) AND (2))'})
WITH b,g limit 3000
Create (g)-[:HasItem]->( b)
I'm dumbfounded from this problem. please help !
:group(Id)
? – Michael Hunger