r in this case is a collection. You have to map the collection to the values: RETURN n.genre, m.age, extract(rel in r | r.likes)
or sum them up/average them RETURN n.genre, m.age, reduce(sum=0.0, rel in r | sum + r.likes) / size(rel) as avg On Sat, Jan 28, 2017 at 8:27 PM, Marwa Elabri <[email protected]> wrote: > I used SortestPath also to return node and relationship properties but it > doesn't work > > like this > MATCH shortestPath((n:movie)<-[r:rating]-(m:user)) > with distinct n,m,r > return n.genre, m.age,r.likes > > I got this error > > : Expected `r` to be a Map but it was a Collection<Relationship> > > > Le samedi 28 janvier 2017 19:50:42 UTC+1, Marwa Elabri a écrit : >> >> so how can I make my retrieval queries more faster >>> >>> because I have a Relational database that I converted to neo4j database >> when the size of the database is large >> sql queries are always faster than cypher queries in my neo4j database >> >> I want to make like join queries in RDB but with cypher queries in neo4j >> database >> in reality join query are expensive but in my case when I make my queries >> and I have some queries are very longs with ("match and many optional match >> statement") to return many node and relationships properties always neo4j >> is slower than SQL queries (in term of time execution) >> >> please have you any idea to make my queries more faster >> >> >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
