Another simple attempt is to obtain different type of rel (r,s) going from a node to others (n-m).
I tried: MATCH (n:TYPE)-[s:P1]-m WHERE n.id = 'myname' WITH n,s,m MATCH m-[r:P2]-n RETURN r,s but it returns 0 rows, Both the two matches from the node n.id, return not empty results in a single query (one match per query). Why do r, s return no results with the combined query ? Il giorno venerdì 8 agosto 2014 01:04:12 UTC+2, gg4u ha scritto: > > Hi folks! > > so, today I was experimenting on obtaining a linear combination out of > multiple types of properties. > Suppose you have multiple REL types, each with weighted properties. > > I am trying to obtain a collection? of first neighbors to a node, ordered > by the sum of two weights. > > Here's what i've done: > > MATCH (n:TYPE) > WHERE n.id = 'hellyeah' > OPTIONAL MATCH n-[r:P]-m > OPTIONAL MATCH n-[s:P2]-m > RETURN n,r,s,m > > with this query, i get a table BUT all values of s are set as > NULL > could you help me understand > why? > > thank you! > > -- 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.
