Hi, I have a graph database of people (nodes) and one type of relationship between them. The relationship has a "strength" property in the form of an integer.
What I am trying to do is:
- get a specific person
- find the top 10 (strongest) contacts of this one node
- for each of the 10 nodes returned, return the 2 strongest contacts of that node.
I would want around 30 nodes to be returned... 10 first order nodes and 2 second order nodes for each of those
I have tried many different queries, typically like this:
MATCH (a:Person {EmailAddress: 'test@test.com'})-[rel]-(b:Person)-[rel2]-(c:Person)
RETURN a, rel, b, rel2, c order by rel.Strength desc, rel2.Strength desc limit 30
My problem is that I am getting one first order node, and 29 second order nodes, "eating up" all my limit of 30.
Is there a way to force a limit on each level? In other words, specify multiple "limit" values?
Thanks