Unnikrishnan
Unnikrishnan

Reputation: 11

label names to group nodes in neo4j

I'm currently working on a system which requires many disconnected graphs in a single database.I was having an approach in my mind that,if the nodes are grouped with each group having a label name, each group of nodes and its relationships together acts as an independent graph and I can call in the label name and query correspondingly to traverse through each graphs. Is this in any way possible.

Example: label_1(node_1-->node_2-->node_3),label_2((node_4-->node_5-->node_6)

here label_1 and label_2 are 2 labels with uniquely defines two graphs inside the same neo4j database

Upvotes: 1

Views: 395

Answers (1)

Aravind Yarram
Aravind Yarram

Reputation: 80194

One of the use cases of labels is for grouping the logically related nodes. And since labels are indexed as well, your use case seems to be a natural fit.

Upvotes: 1

Related Questions