Hi,
I'm new to Neo4j so I might be doing it the wrong way!
I have a set of nodes called Recipe. Each Recipe is in a relationship with one or more Ingredient. Now I want to search for Recipes that contain a specific list of Ingredients.
For example, if my ingredient list in search criteria is "Asparagus", it must return "Scrambled Eggs with Asparagus" which contains Asparagus but also includes other ingredients that weren't in the search criteria.
I have this Cypher query and it returns the recipe correctly:
MATCH (n:Recipe)-[r:INGREDIENTS]->(m:Ingredient) where (m.name = 'Asparagus') return n,collect(r),collect(m);
But my problem is that it only returns the Recipe node and the Asparagus node while I want it to return Recipe node with all of its ingredients. I tried "exists" but it returns the same result but slower!
Does anyone know what I can do?
Any help is much appreciated