Hi, I'm trying to aggregate returned nodes by an amount of property types.
Basically I have (r:Recipe)-[:HAS_CUISINE]->(c:Cuisine)
I'd like to return 10 recipes from each Cuisine in my database
I feel like it should be something close to
MATCH(c:Cuisine)
WITH collect(DISTINCT c.name) as cuisines
UNWIND cuisines as cuisine
apoc.cypher.run('
MATCH(r:Recipe)-[:HAS_CUSINE]->(c:Cuisine {name: cuisine})
RETURN r LIMIT 10
', {cuisine: cuisine}) YIELD value
RETURN value.r as recipes
LIMIT 100
The problem I keep running into is I only ever get 10 recipes back.