Update internal node Ids to be a sequence

11 views
Skip to first unread message

Mohammad Hossain Namaki

unread,
Sep 25, 2016, 11:02:01 PM9/25/16
to Neo4j
Dear programmers,
Hi,
I have a requirement to have all node Id's in the graph database started from 0....[max Number Of Nodes]. I won't add/remove any node after I create the initial graph database. Right now, I have a graph database that is not like that so node Id's are like 0,1,10,100,101,102,103,1000, ....

Do we have any fast way to update nodeId's starting from 0 and incrementing one by one.

Thanks.

Michael Hunger

unread,
Sep 26, 2016, 12:33:35 AM9/26/16
to ne...@googlegroups.com
Not sure why you need it. 

I recommend using an id property 

You can make a copy of the graph iterating over all nodes and recreating them to get sequential internal ids


Von meinem iPhone gesendet
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages