Node types.

21 views
Skip to first unread message

Manoj Waikar

unread,
Aug 24, 2015, 1:15:11 AM8/24/15
to clojure-neo4j
Hi,

I've noticed that while creating nodes using Neocons, there is no way to distinguish between nodes, when viewed in the Neo4j browser. If I use Neo4j OGM (Object Graph Mapper) with Java, different types of nodes are visible in different colors, so its easy to distinguish between them.

The other difference that I noticed is that for the nodes created with Neo4j OGM, the Neo4j browser picks up one random property of the node and displays it, whereas for nodes created with Neocons, it wasn't picking any default property.

So my question is - Do you plan to introduce a type property to a node so that it becomes easy to distinguish between them?

Thanks and regards,
Manoj.

Rohit Aggarwal

unread,
Aug 24, 2015, 11:23:37 AM8/24/15
to clojure-neo4j
Hi Manoj,
Neo4j natively doesn't have the concept of "Type". Rather it has the concept of Labels.

I don't know what Neo4j OGM is doing but I am guessing that it is translating types to labels. I haven't ever used the OGM so best to contact OGM authors about how they map types to labels.

Having said that, Neocons does allow you to add labels to a node. You can add a label to a node via a native call or through cypher such as "CREATE (n:Person { name : 'Andres', title : 'Developer' })".

Hope this helps.

-Rohit

Manoj Waikar

unread,
Aug 25, 2015, 12:48:33 AM8/25/15
to clojure-neo4j
Thanks Rohit, you are right, adding labels to the nodes gives me the desired outcome.

Regards,
Manoj.

Rohit Aggarwal

unread,
Aug 25, 2015, 5:01:00 AM8/25/15
to clojure-neo4j
Thats great.
Reply all
Reply to author
Forward
0 new messages