I am writing one cypher query like below but not getting the results. I want to find the last node in the path and also need one node before that final node.
You would get results from the second cypher only (and not from the first cypher) if there is only one relationship of type RECOMMENDED to lastNode. But if it works with gremlin, then it should be another explanation.
Thanks @martin3 for your response.
Is it the behavior of cypher which makes first query to fail ?
My gremlin query is like below. This is working fine.
I think that in the first example there has to be two relationships to lastNode, becuase the same path is not traversed twice. But this does not have to be the case in the second example where the same path could be traversed two times, and I also do not think that this has to be the case for the gremlin example (even though I do not speak any gremlin). This is one thing that could make the first example different from the other two examples, and that COULD potentially be the explanation, but not necessary so and not possible the right explanation, becuase that depends on your data.
So this is just speculations from my side. Maybe someone else have an idea?