user1919
user1919

Reputation: 3938

Migration from Neo4j1.9 to Neo4j2.1.6

I am a beginner in graph databases and neo4j. I am trying to undestand how to make the migration (and what would this mean) from neo4j 1.9 to neo4j 2.1.6. I read here the procedure I have to follow (http://neo4j.com/docs/stable/deployment-upgrading.html#explicit-upgrade). I understand that after the upgrade I will have all the nodes and relationships I had previously together with the functionalities of neo4j2.1.6. Is that correct? What I want to know is if there is a way to automatically declare labels, unique constraints and the new indexing functionalities during the migration. Or this is something that I will have to do "manually" after?

Thank you in advance. Dimitris

Upvotes: 0

Views: 38

Answers (1)

FrobberOfBits
FrobberOfBits

Reputation: 18002

After the upgrade, you'll have the features of neo4j 2.1.* in the sense that you can use them, but it's not done automatically for you.

Labels, unique constraints, and certain types of indexes are the really useful new stuff that you'll see. Labels are a way of categorizing types of nodes. Say you have Person nodes and Job nodes, well you might want to apply those labels. But no database is smart enough by itself to automatically figure that out. Instead, what you might do is go through your data and apply the label.

After migration for example, you could do this:

MATCH (n)
WHERE has(n.first_name)
SET n:Person
RETURN n;

This will apply the "Person" label to any node with a first_name attribute.

Everything else (indexes, unique constraints) again has to be done manually by you. Consider it a portion of your graph structure design. Neo4J will let you implement any kind of graph you like, but it won't do it for you. :)

Upvotes: 1

Related Questions