I am quite new to Marklogic and xquery in general. We have a collection of documents which have a deadline date as a node. Can somebody help me with an xquery to get the latest document based on deadline date? Each document looks like
<document>
<Id>blah<Id>
<DeadlineDate>2012-04-04T21:00:00</DeadLineDate>
You will need a range index on
DeadlineDate, of typedateTime.Or you could also use this form:
I think the first one will usually be faster, but that might be worth testing.