Hi Sundar, Gary makes a good point here. To see how Saerch API turns sorting into a FLWOR expression you can always include
<debug>true</debug> in your options to see what expression your options + search boil down to. You sould see an ORDER BY clause in the debug output (which comes back in <search:report> element) Charles On 11/13/2013 05:28 AM, Gary Vidal wrote: > Sundaravadivel, > > Sorting be least relevance is a bad move especially over large result sets. > Consider that if you have 1M records that it will need to compute scores for > 1M records before it can return a sort order. Could you give the use case > why you would need results with lower scores first? If that is the case then > it would be better to invert the search using a not-query($your-query) then > work from there. > > Gary Vidal > Media Consultant > MarkLogic Corporation > [email protected] > Phone: +1 917 576-5794 > Skype: ml-garyvidal > www.marklogic.com > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general -- Charles Greer Senior Engineer MarkLogic Corporation [email protected] Phone: +1 707 408 3277 www.marklogic.com _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
