cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j desktop V1.2.1 Not Annotating Graph

Ciro
Node Clone

I'm running the Neo4j desktop app (V1.2.1) on an iMac running macOS Mojave (V10.14.6). I recently used the browser in the desktop app to create a simple three-person graph of communications between and among the three people.

CREATE (nodeAdam:Member {UserName:'Adam', DateJoined:'2010-10-10', Location:'America', Role:'Moderator', Repository:'kubernetes'})
CREATE (nodeBrian:Member {UserName:'Brian', DateJoined:'2011-11-11', Location:'England', Role:'Lurker', Repository:'kubernetes'})
CREATE (nodeCarl:Member {UserName:'Carl', DateJoined:'2012-12-12', Location:'Germany', Role:'SME', Repository:'kubernetes’})
CREATE (nodeM000001:Message {MID:'000001', DateTime:'2019-08-01T08:20:10Z', Content:'This is an original message from Adam to Brian.'})
CREATE (nodeM000002:Message {MID:'000002', DateTime:'2019-08-01T08:25:15Z', Content:'This is the reply from Brian in response to the original message Adam sent.'})
CREATE (nodeM000003:Message {MID:'000003', DateTime:'2019-08-01T08:30:20Z', Content:'This is the reply from Adam in response to the reply from Brain.'})
CREATE (nodeM000004:Message {MID:'000004', DateTime:'2019-08-01T08:35:25Z', Content:'This is an original message from Adam to Carl.'})
CREATE (nodeM000005:Message {MID:'000005', DateTime:'2019-08-01T08:35:25Z', Content:'This is the reply from Carl in response to the original message Adam sent.'})
CREATE (nodeM000006:Message {MID:'000006', DateTime:'2019-08-01T08:35:25Z', Content:'This is the reply from Adam in response to the reply from Carl.’})
CREATE (nodeAdam)-[:SENDS]->(nodeM000001)
CREATE (nodeM000001)-[:ADDRESSED_TO]->(nodeBrian)
CREATE (nodeBrian)-[:SENDS]->(nodeM000002)
CREATE (nodeM000002)-[:ADDRESSED_TO]->(nodeAdam)
CREATE (nodeM000002)-[:IN_REPLY_TO]->(nodeM000001)
CREATE (nodeAdam)-[:SENDS]->(nodeM000003)
CREATE (nodeM000003)-[:ADDRESSED_TO]->(nodeBrian)
CREATE (nodeM000003)-[:IN_REPLY_TO]->(nodeM000002)
CREATE (nodeAdam)-[:SENDS]->(nodeM000004)
CREATE (nodeM000004)-[:ADDRESSED_TO]->(nodeCarl)
CREATE (nodeCarl)-[:SENDS]->(nodeM000005)
CREATE (nodeM000005)-[:ADDRESSED_TO]->(nodeAdam)
CREATE (nodeM000005)-[:IN_REPLY_TO]->(nodeM000004)
CREATE (nodeAdam)-[:SENDS]->(nodeM000006)
CREATE (nodeM000006)-[:ADDRESSED_TO]->(nodeCarl)
CREATE (nodeM000006)-[:IN_REPLY_TO]->(nodeM000005)

When I queried the database with MATCH path=()-[r:SENDS]->() RETURN path the browser displayed a graph with the nodes and relationships properly annotated. I could also see those items when I showed the table of the query result.

I just used the browser to create another simple four-person graph of postings to an online community. When I queried the database the browser

CREATE (nodeAdam:Member {UserName:'Adam', DateJoined:'2010-10-10', Location:'America', Role:'Moderator'})
CREATE (nodeBrian:Member {UserName:'Brian', DateJoined:'2011-11-11', Location:'England', Role:'Lurker'})
CREATE (nodeCarl:Member {UserName:'Carl', DateJoined:'2012-12-12', Location:'Germany', Role:'SME'})
CREATE (nodeDave:Member {UserName:'Dave', DateJoined:'2013-09-09', Location:'France', Role:'SME’})
CREATE (nodeI01:Issue {IID:'I01', DateTime:'2019-08-01T08:10:10Z', Content:'This is an Issue posted by Adam'})
CREATE (nodeC01:Comment {CID:'C01', DateTime:'2019-08-01T08:15:15Z', Content:'This is a Comment posted by Brian to the Issue Adam posted'})
CREATE (nodeC02:Comment {CID:'C02', DateTime:'2019-08-01T08:15:25Z', Content:'This is a Comment posted by Carl to the Issue Adam posted'})
CREATE (nodeC03:Comment {CID:'C03', DateTime:'2019-08-01T08:15:30Z', Content:'This is a Comment posted by Adam to the Issue Adam posted'})
CREATE (nodeC04:Comment {CID:'C04', DateTime:'2019-08-01T08:15:35Z', Content:'This is the second Comment posted by Brian to the Issue Adam posted'})
CREATE (nodeC05:Comment {CID:'C05', DateTime:'2019-08-01T08:15:40Z', Content:'This is a Comment posted by Dave to the Issue Adam posted’})
CREATE (nodeI02:Issue {IID:'I02', DateTime:'2019-08-02T08:10:10Z', Content:'This is an Issue posted by Dave'})
CREATE (nodeC06:Comment {CID:'C06', DateTime:'2019-08-02T08:15:15Z', Content:'This is a Comment posted by Brian to the Issue Dave posted'})
CREATE (nodeC07:Comment {CID:'C07', DateTime:'2019-08-02T08:15:25Z', Content:'This is a Comment posted by Carl to the Issue Dave posted'})
CREATE (nodeC08:Comment {CID:'C08', DateTime:'2019-08-02T08:15:30Z', Content:'This is a Comment posted by Adam to the Issue Dave posted'})
CREATE (nodeC09:Comment {CID:'C09', DateTime:'2019-08-02T08:15:35Z', Content:'This is a Comment posted by Dave to the Issue Dave posted'})
CREATE (nodeC10:Comment {CID:'C10', DateTime:'2019-08-02T08:15:40Z', Content:'This is the second Comment posted by Brian to the Issue Dave posted'})
CREATE (nodeC11:Comment {CID:'C11', DateTime:'2019-08-02T08:15:45Z', Content:'This is the second Comment posted by Carl to the Issue Dave posted’})
CREATE (nodeAdam)-[:POSTS]->(nodeI01)
CREATE (nodeBrian)-[:POSTS]->(nodeC01)
CREATE (nodeC01)-[:REPLIES_TO]->(nodeI01)
CREATE (nodeCarl)-[:POSTS]->(nodeC02)
CREATE (nodeC02)-[:REPLIES_TO]->(nodeC01)
CREATE (nodeAdam)-[:POSTS]->(nodeC03)
CREATE (nodeC03)-[:REPLIES_TO]->(nodeC02)
CREATE (nodeBrian)-[:POSTS]->(nodeC04)
CREATE (nodeC04)-[:REPLIES_TO]->(nodeC03)
CREATE (nodeDave)-[:POSTS]->(nodeC05)
CREATE (nodeC05)-[:REPLIES_TO]->(nodeC04)
CREATE (nodeDave)-[:POSTS]->(nodeI02)
CREATE (nodeBrian)-[:POSTS]->(nodeC06)
CREATE (nodeC06)-[:REPLIES_TO]->(nodeI02)
CREATE (nodeCarl)-[:POSTS]->(nodeC07)
CREATE (nodeC07)-[:REPLIES_TO]->(nodeC06)
CREATE (nodeAdam)-[:POSTS]->(nodeC08)
CREATE (nodeC08)-[:REPLIES_TO]->(nodeC07)
CREATE (nodeDave)-[:POSTS]->(nodeC09)
CREATE (nodeC09)-[:REPLIES_TO]->(nodeC08)
CREATE (nodeBrian)-[:POSTS]->(nodeC10)
CREATE (nodeC10)-[:REPLIES_TO]->(nodeC09)
CREATE (nodeCarl)-[:POSTS]->(nodeC11)
CREATE (nodeC11)-[:REPLIES_TO]->(nodeC10)

This time when I issued the query MATCH path=()-[r:POSTS]->() RETURN path the browser generated a graph and corresponding table that were blank - no annotations. Can you please help me understand what I did did wrong?

Thanks in advance for your help,
Regards,
Ciro Pinto-Coelho

1 ACCEPTED SOLUTION

There is a heuristic
it choses properties like name, title, label or containing those

But you can of course select them. see

View solution in original post

4 REPLIES 4

You have 3 typos in your 2nd statement, you used the wrong single quote character.

If you run your statement you should either see the number of nodes and relationships created or an error message. Watch out for that. This works.

CREATE (nodeAdam:Member {UserName:'Adam', DateJoined:'2010-10-10', Location:'America', Role:'Moderator'})
CREATE (nodeBrian:Member {UserName:'Brian', DateJoined:'2011-11-11', Location:'England', Role:'Lurker'})
CREATE (nodeCarl:Member {UserName:'Carl', DateJoined:'2012-12-12', Location:'Germany', Role:'SME'})
CREATE (nodeDave:Member {UserName:'Dave', DateJoined:'2013-09-09', Location:'France', Role:'SME'})
CREATE (nodeI01:Issue {IID:'I01', DateTime:'2019-08-01T08:10:10Z', Content:'This is an Issue posted by Adam'})
CREATE (nodeC01:Comment {CID:'C01', DateTime:'2019-08-01T08:15:15Z', Content:'This is a Comment posted by Brian to the Issue Adam posted'})
CREATE (nodeC02:Comment {CID:'C02', DateTime:'2019-08-01T08:15:25Z', Content:'This is a Comment posted by Carl to the Issue Adam posted'})
CREATE (nodeC03:Comment {CID:'C03', DateTime:'2019-08-01T08:15:30Z', Content:'This is a Comment posted by Adam to the Issue Adam posted'})
CREATE (nodeC04:Comment {CID:'C04', DateTime:'2019-08-01T08:15:35Z', Content:'This is the second Comment posted by Brian to the Issue Adam posted'})
CREATE (nodeC05:Comment {CID:'C05', DateTime:'2019-08-01T08:15:40Z', Content:'This is a Comment posted by Dave to the Issue Adam posted'})
CREATE (nodeI02:Issue {IID:'I02', DateTime:'2019-08-02T08:10:10Z', Content:'This is an Issue posted by Dave'})
CREATE (nodeC06:Comment {CID:'C06', DateTime:'2019-08-02T08:15:15Z', Content:'This is a Comment posted by Brian to the Issue Dave posted'})
CREATE (nodeC07:Comment {CID:'C07', DateTime:'2019-08-02T08:15:25Z', Content:'This is a Comment posted by Carl to the Issue Dave posted'})
CREATE (nodeC08:Comment {CID:'C08', DateTime:'2019-08-02T08:15:30Z', Content:'This is a Comment posted by Adam to the Issue Dave posted'})
CREATE (nodeC09:Comment {CID:'C09', DateTime:'2019-08-02T08:15:35Z', Content:'This is a Comment posted by Dave to the Issue Dave posted'})
CREATE (nodeC10:Comment {CID:'C10', DateTime:'2019-08-02T08:15:40Z', Content:'This is the second Comment posted by Brian to the Issue Dave posted'})
CREATE (nodeC11:Comment {CID:'C11', DateTime:'2019-08-02T08:15:45Z', Content:'This is the second Comment posted by Carl to the Issue Dave posted'})
CREATE (nodeAdam)-[:POSTS]->(nodeI01)
CREATE (nodeBrian)-[:POSTS]->(nodeC01)
CREATE (nodeC01)-[:REPLIES_TO]->(nodeI01)
CREATE (nodeCarl)-[:POSTS]->(nodeC02)
CREATE (nodeC02)-[:REPLIES_TO]->(nodeC01)
CREATE (nodeAdam)-[:POSTS]->(nodeC03)
CREATE (nodeC03)-[:REPLIES_TO]->(nodeC02)
CREATE (nodeBrian)-[:POSTS]->(nodeC04)
CREATE (nodeC04)-[:REPLIES_TO]->(nodeC03)
CREATE (nodeDave)-[:POSTS]->(nodeC05)
CREATE (nodeC05)-[:REPLIES_TO]->(nodeC04)
CREATE (nodeDave)-[:POSTS]->(nodeI02)
CREATE (nodeBrian)-[:POSTS]->(nodeC06)
CREATE (nodeC06)-[:REPLIES_TO]->(nodeI02)
CREATE (nodeCarl)-[:POSTS]->(nodeC07)
CREATE (nodeC07)-[:REPLIES_TO]->(nodeC06)
CREATE (nodeAdam)-[:POSTS]->(nodeC08)
CREATE (nodeC08)-[:REPLIES_TO]->(nodeC07)
CREATE (nodeDave)-[:POSTS]->(nodeC09)
CREATE (nodeC09)-[:REPLIES_TO]->(nodeC08)
CREATE (nodeBrian)-[:POSTS]->(nodeC10)
CREATE (nodeC10)-[:REPLIES_TO]->(nodeC09)
CREATE (nodeCarl)-[:POSTS]->(nodeC11)
CREATE (nodeC11)-[:REPLIES_TO]->(nodeC10)

Michael,
Thanks so much for taking the time to answer my question, I really appreciate it.

Interestingly enough, I ran the statements I posted without any error messages from the browser.

I executed the statements you posted and got an annotated graph. BTW, how does the browser choose which property to use in its annotation of a graph? For the Issue nodes, the browser chose the IID value. For the Comment nodes, the browser chose the Content value. Is there a way to designate which property it uses?

Thanks again for your help!
Regards,
Ciro Pinto-Coelho

There is a heuristic
it choses properties like name, title, label or containing those

But you can of course select them. see

Thanks Michael, much appreciated!

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online