I am inserting some xml documents from the UI in Marklogic Server and at the same time showing them in a list. I want to show the documents in a order. The document first inserted should come first in a list. Second document should come at second place and so on. But Marklogic is showing them randomly without any order.
Share
The insert order is not persisted or preserved when working with MarkLogic Server. If you want your document’s insert order to be preserved the data or the data’s properties will need some value upon which the server can do an “order by” clause.
The documents are indeed independent from each-other in a “shared nothing” architecture. This helps MarkLogic run much faster than some relational database approaches where “rows” share membership and ordering in a “table” and as a result have trouble clustering efficiently.