new to Neo4j.
I have some nodes connected by relationships that have a "weight" property with a number. I am trying to get an average of the weight properties for all relationships returned in the query.
Here is the query I'm trying:
MATCH (x)-[r*1..6]-prod:Product
WHERE x.name = 'ddbrown::default'
RETURN sum(r.weight);
I get the following exception
CypherTypeException: Expected `r` to be a Map but it was a Collection<relationship>
I'm obviously misinterpreting what's getting returned as r, but i'm not sure how to get a named pointer to each relationship.
Thanks for any help! Dean