ibm bluemix - Setting the _id of cloudant in node-red to ensure order of documents -
i have node-red code works in following way:
receives message (json form) , saves cloudant db
can make http call can see contents of db
this good, problem when saves cloudant, gives random _id, order of documents in db isn't same order came in, random.
is there way maybe set _id while saving in node red? or there solution?
i want when call http shows in order came in (last first, or first last, doesn't matter).
you can set _id
function node or change node before passing cloudant out node.
but if want them in order arrived add timestamp field , make query node use view sorts documents timestamp
Comments
Post a Comment