cts:search returns results in relevance order. If you want to order on something else, you need to bring back all of the results and then sort them. For example, you can sort them using a FLWOR with an order by clause:
for $x in cts:search(of something) order by $x/mynode return $x If you have very large result sets, you may want to change your query so you do not have to bring back that huge result set and sort it. Depending on what you are trying to do, there might be other ways to do this. For example, XPath expressions return in document order. -Danny From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of GangCheng Zhong Sent: Monday, May 05, 2008 3:26 AM To: [email protected] Subject: [MarkLogic Dev General] Order by question Hi, all After using cts:search() function, I got plenty of nodes ( over 50 thousands ), how to use "order by" to apply to these giant results? Thanks
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
