I need to seed a Neo4j database and have random Persons join random Organizations. I have the following Cypher query:
MATCH (p:Person), (o:Organization)
WITH p, o
WHERE rand() < 0.1
MERGE (p)-[:MEMBER_OF]->(o)
The problem is that this query is giving each person a 10% chance to join all organizations. How can I get this query to generate a random number for every combination of Persons and Organizations?
Aucun commentaire:
Enregistrer un commentaire