Hi, I have an element DateTimeList in each record with child element as follows
<record > <DateTimeList> <DateTime>2014-05-07T10:26:00</DateTime> </DateTimeList> </record> <record> <DateTimeList> <DateTime>2013-12-01T00:00:00</DateTime> <DateTime>2014-05-01T00:00:00</DateTime> <DateTime>2014-12-01T00:00:00</DateTime> </DateTimeList> </record> <record> <DateTimeList> <DateTime>2013-09-01T10:32:42</DateTime> </DateTimeList> </record> <record> <DateTimeList> <DateTime>2014-05-30T00:00:00</DateTime> <DateTime>2015-05-30T00:00:00</DateTime> </DateTimeList > </record> I have element-range-index for <DateTime> as xs:dateTime. In search:search options when <DateTime> is used for Sort-Order, by default it takes the newest date in each record for descending order and the oldest date in each record for ascending order. But my requirement is to sort(asc/desc) records based only on the oldest date in each record. Also we tried creating Path-Range-Index as follows since the first <DateTime> child element holds the oldest date always <path-index>/record/DateTimeList/DateTime[1]</path-index> which didn't work either. Can someone guide me on this? Your help is greatly appreciated. Thanks, Blessing
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general