Cypher start doesnt allow combining multiple starting points with start node sets #897

Open
gerbenoostra opened this Issue Jun 20, 2013 · 6 comments

Projects

None yet

3 participants

@gerbenoostra

With the following cypher query:
START a=node(1,2,3), b=node(1,2,3)
MATCH a-[:EDGE]-b
RETURN a
In a complete graph, only edges to/from node 1 are returned.

After playing with some different ids, it seems that of one of the two node id sets, only the first is actually used.

I'm using neo4j version.2.0.0-M03

@freeeve
Contributor
freeeve commented Jun 23, 2013

You're going to need to provide a concrete example--it seems to work fine for me:

http://console.neo4j.org/r/z7bpf6

Are you sure there's an :EDGE between the nodes that should be matched?

@gerbenoostra

Hi,

Sorry not to have provided an exact example. I ran the following query on the provided console:
Query:
START a=node(5,4), b=node(5,4,6)
MATCH a-[e:KNOWS|LOVES]-b
RETURN a,e,b

a e b
(5 {name:"Morpheus"}) (5)-[3:KNOWS]->(4) (4 {name:"Trinity"})
(4 {name:"Trinity"}) (5)-[3:KNOWS]->(4) (5 {name:"Morpheus"})
(5 {name:"Morpheus"}) (6)-[1:KNOWS]->(5) (6 {name:"Neo"})

Query took 170 ms and returned 3 rows. ...

But expected to also have received the edge from 6{"Neo"} to 4{"Trinity"}

I could not make a new shared console because the node ids changed on refresh.

@freeeve
Contributor
freeeve commented Jun 24, 2013

In the console you get 4 rows from that query (I adjusted the node ids to match the nodes you were looking at):

http://console.neo4j.org/r/g2r2tu

@gerbenoostra

cypher_result

I think i have just 3.

@freeeve
Contributor
freeeve commented Jun 26, 2013

hmm

Ok, I believe you... this does seem wrong.

@peterneubauer
Contributor

Another one:

data set url:
http://console.neo4j.org/?id=qwdh4p

cypher:
START n=node(1,2,3),n1=node(1,2,3)
MATCH n-[r]-n1
RETURN n,r,n1;

result:
the cypher query lost relationship:(3)-[0:KNOWS]->(2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment