4

I'm using Neo4j Community edition 2.1.4. I have hierarchy of 4 levels and each level names i have treated it as label name for that level.So in my graph i have totally 4 labels. Now for the first time I have loaded csv file into neo4j and using MERGE and CREATEkeywords created the nodes and relationships. In future the requirement is like

scenario 1:

if someone wants to rename the hierarchy level name to some new name, then I have to   
change the label name to a new name.

Scenario 2:

if any of the property name of node changes to to new name 

In the both the cases i wanted to track the history of the node. How can i do it? So that in future someone wants to see the history details , they can query and get the details.

So how can i track the history details of the nodes in neo4j?

My Approch: For the first time i will load the csv file and create nodes and relationships. Then if someone wants to change the label name of node A(level name which is standard) which is having a properties like ID, name,start_date,end_date,Status.Then i will replicate the node A with all the properties and change the status to inactive and i will overwrite the old node with the new details. But i'm clueless whether this solution is going to work or not. Also i have more thane 10000 nodes in my db.

So please suggest me a better approach to track the nodes history.

shree11
  • 535
  • 4
  • 13
  • 26
  • You can use versionning. Examples in this blog post : http://www.neo4j.org/graphgist?608bf0701e3306a23e77 that you can adapt for your needs – Christophe Willemsen Sep 29 '14 at 11:13
  • @ChristopheWillemsen Perfect, you should make that an answer, it is the answer! See also the answer on this question from earlier today http://stackoverflow.com/questions/26127263/neo4j-how-to-snapshot-everything-in-a-label – JohnMark13 Oct 01 '14 at 19:13
  • @shree11 you should accept some answers. – JohnMark13 Oct 01 '14 at 19:13

2 Answers2

2

Have a look at the GraphAware ChangeFeed Module. You can track history of changes and also configure which changes you would like to track and which to ignore.

Michal Bachman
  • 2,661
  • 17
  • 22
  • i tried but stuck, please have a look on http://stackoverflow.com/questions/30961993/localhost7474-graphaware-changefeed-cfm-gives-404 – Govind Singh Jun 21 '15 at 09:29
0

You can use versionning. Examples in this blog post : neo4j.org/graphgist?608bf0701e3306a23e77 that you can adapt for your needs

Christophe Willemsen
  • 19,399
  • 2
  • 29
  • 36