I have some problems to receive some Nodes and relationships and I hope someone here can actually help to find my mistake!
Broken down:
I have three nodes:
- a Node labelled :Person with the property firstname
- a Node labelled :Event
- a Node labelled :Question with the property id
Basically the Relationship are as following:
(p:Person)-[:CREATED_EVENT]->(e:Event)
and
(e:Event)-[:ANSWERED]->(q:Question)
I tried to query:
MATCH
(p:Person)-[:CREATED_EVENT]->(e:Event)<-[:ANSWERED]-(q:question)
WHERE p.firstname = "foo" AND q.id=2
RETURN p, e, q;
But my query is not returning any Node at all.
I haven't created any Indexes yet. But if I read correctly you can only create Indexes on properties and it will only speed up your queries.
Can anybody spot a mistake?
Thank you for your help!