Hi Peter, Yes, there are ways to generate sequential numbers, but they will slow down ingest. You can use this library instead to generate guaranteed unique random uris:
https://github.com/grtjn/ml-unique Kind regards, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of Peter Davies <pjj...@hotmail.co.uk<mailto:pjj...@hotmail.co.uk>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, January 25, 2016 at 4:53 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] Can marklogic generate unique sequential numbers In SQL server a record has a Primary key for a user I would simply put an identity column (1,1) unique id into a table. I utilise this property throughout the database and as in any standard sql rdbms I can use it as a foreign key Say I have a document ( User Username UserID CustomerID ) Since in ML the record is the document is there a similar way to create a unique id internal to the document. I can migrate exists rdbms data with this already done. but from ML ho would I create a new user with a unique ID I know that the document will have a unique doc it but say I want to xquery a company by name and then get a list of all the users from that company to perform validation and sign on it it possible that company could have two users with the same name hence the requirement to uniquely id them. I know I am thinking still as a DBA in an RDBMS but if I want to do this is there an already existing function that performs this task in ML Is it achievable or do I need to get rid of my sql notions and think again. as you can guess by the question I am very new to ML
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general