With this query I am importing 75000 nodes from my csv file. (Category)
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS
FROM "file:///prodcategory.csv" AS row
CREATE (:Category {id: row.idProdCategory, name: row.name, idRestaurant: row.idRestaurant});
And with this query I am also importing 1 million nodes from my csv file (Product)
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS
FROM "file:///products.csv" AS row
CREATE (:Product {id: row.idProduct, idProductCategory: row.idProductCategory,name: row.name,idRestaurant:row.idRestaurant ,description: row.description, price: row.price, shipping_price: row.shippingPrice});
I am using this query to create the relationship between id -> category and idProductCategory -> products.
MATCH (category:Category {id: category.id})
MATCH (Product:Product {idProductCategory: Product.idProductCategory})
WHERE Product.idProductCategory=category.id
MERGE (category)-[:OF_CATEGORY]->(Product);
This query only creates 2999 relationships and I do not believe the 1 million relationships I should create, please if there is a method or configuration to be able to create more than 1 million relationships please help me I would be very grateful.