Thanks Charles,
        I fixed the issue.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Charles Greer
Sent: Wednesday, November 13, 2013 10:53 PM
To: [email protected]
Subject: Re: [MarkLogic Dev General] Sorting in Search API

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

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to