Hi, I'm trying to make a general cypher query for different situations in my knowledge graph. This is my query:
match (e:ThanhLap)--(b:Entity) where b.name = "Nhà nước Cộng hòa Liên bang Đức"
match (e)-[r1:Causal|nguyen_nhan]-(e1)
match path = (e1)-[r2:(Causal|NextEvent)*]-()
return path
I have a particular case, in which (e) and (e1) connected by (nguyen_nhan) relation. But other cases (e) and (e1) can be connected by (Causal) relation or by both (means there can be multiple e1) that's why I use or in the relation skeleton then I continue spread out the path by Causal and NextEvent relation. The problem is I thought use the * symbol to match zero or more, e.g the path will return e1 if there is no relation has type Causal or NextEvent with something else. But when I execute the query, it returns empty. It means that the symbol * doesn't what I thought it should be (zero or more) Is it correct? If yes how can I express the cypher in this scenario.