Recall node -id as an implementation detail (for example, the rowid of relational databases can be used to identify nodes, but you should not rely on never reusing them).
You would add your natural keys as properties in the node, and then index your nodes with the natural key (or enable automatic indexing for them).
E..g in the Java API:
Index<Node> idIndex = db.index().forNodes("identifiers"); Node n = db.createNode(); n.setProperty("id", "my-natural-key"); idIndex.add(n, "id",n.getProperty("id"));
With an automatic indexer, you would enable automatic indexing for your id field.
See: http://docs.neo4j.org/chunked/milestone/auto-indexing.html And: http://docs.neo4j.org/chunked/milestone/indexing.html
Michael Hunger Jan 29 2018-12-12T00: 00Z
source share