The HiLo key information is stored in the NormHiLoKey collection. You can increment the value in this collection to change the starting value of the generated keys, using the following command in the Mongo shell:
db.NormHiLoKey.update({ _id: "nameOfCollection" }, { $inc: { ServerHi: 42 } })
CAUTION
Do not set the ServerHi value from the Mongo shell! The ServerHi is stored as a 64 bit integer, which cannot be represented in the shell. So if you set the value from the shell, it will change the underlying data type and break the NoRM deserializer.
If you run the db.NormHiLoKey.find()
command, you'll likely see objects with floatApprox properties. This is an indication that the underlying data type is a 64 bit integer. By using the $inc operator you can safely modify the value, without accidentally breaking anything.