I have a neo4j database that contains a bunch of ingredient and recipe nodes with CONTAINS relationships between them, i.e. (recipe)-[CONTAINS]->(ingredient).
I want to find all recipes that contain two specific ingredients, but I can't figure out how to do it. Conceptually it seems like what I want is:
START ingr1=node:Ingredients(id=1), ingr2=node:Ingredients(id=2)
MATCH recipe-[CONTAINS]->ingr1,
recipe-[CONTAINS]->ingr2
RETURN recipe
Apparently it's not OK to match against the same relationship with different start and end nodes. What's the right way to think about this, and what would a proper query look like?