havenwang
havenwang

Reputation: 153

Neo4j multiple graphs on one server/cluster

Note: This is similar to the question asked here: Storing multiple graphs in Neo4J - but this question was asked in 2011 and I haven't found a direct answer for Neo4j 3.

Is there a way to configure the properties for Neo4j so that there are multiple graphs available to my application, using a single Neo4j instance?

My use case is that I would like to operate on multiple similar but discrete graphs. The graph I choose to operate on would be decided on the fly and dynamically during the execution of my application. If I try to choose a graph that doesn't exist yet, it should be created. At points in the future, I may decide to delete one of the graphs, and the deletion would happen independently of the other graphs.

A follow up question is: in the linked post from 2011, an answer mentioned using subgraphs. Is a subgraph set up through neo4j properties, and do they contain each their own set of indexes and property elements?

Upvotes: 2

Views: 667

Answers (1)

Jerome_B
Jerome_B

Reputation: 1097

Assuming your graphs are not sharing nodes. You may try to have a specific label for each graph,like g1, g2 .... and add that label to each node.

Upvotes: 1

Related Questions