You may also want to use range indexes to speed up sorting performance with large results sets. The section "Optimizing Order By Expressions With Range Indexes" in the Query Performance and Tuning Guide (http://developer.marklogic.com/pubs/3.2/books/performance.pdf) provides details. James
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Sokolsky Sent: Monday, May 05, 2008 12:47 PM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Order by question 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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
