[MarkLogic Dev General] Order by question
GangCheng Zhong
zhonggc.ctit at gmail.com
Mon May 5 18:05:19 PDT 2008
Thank you all.
It seems the "Optimizing Order By Expressions With Range Indexes" is my
want.
2008/5/6 James Clippinger <James.Clippinger at marklogic.com>:
> 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:* general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] *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:* general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] *On Behalf Of *GangCheng Zhong
> *Sent:* Monday, May 05, 2008 3:26 AM
> *To:* general at developer.marklogic.com
> *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
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20080506/7a7a8e79/attachment.html
More information about the General
mailing list