Thanks for your response Geert. I tried only on score also, but it didn't works!
Ascending
<sort-order direction="ascending">
<score/>
</sort-order>
Descending
<sort-order direction="descending">
<score/>
</sort-order>
Regards,
Sundar
From: [email protected]
[mailto:[email protected]] On Behalf Of Geert Josten
Sent: Wednesday, November 13, 2013 6:49 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Sorting in Search API
Hi Sundar,
Your first sort-order element appears to be incomplete, maybe that interferes
with your results. Did you try sorting only on score both descending and
ascending? If that works, then multiple sort orders should in principle work as
well..
Kind regards,
Geert
Van:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
Namens Sundaravadivel Kandasamy
Verzonden: woensdag 13 november 2013 13:54
Aan: [email protected]<mailto:[email protected]>
Onderwerp: [MarkLogic Dev General] Sorting in Search API
Hi,
Is it possible to sort by relevance bi-directional(ascending &
descending)? I use search:search API and sort bi-directionally for the
elements which are indexed. But, for relevance sort doesn't require any element
I couldn't achieve the bidirectional sort using relevance. Any parameters need
to set in the score element for sorting?
I tried by giving below syntax in the <options> element of search API and vice
versa
<sort-order type="xs:string"
direction="ascending"
xmlns="http://marklogic.com/appservices/search">
<annotation>Sort by pertinence</annotation>
</sort-order>
<sort-order direction="descending">
<score/>
</sort-order>
Please, suggest. Thanks in Advance.
Regards,
Sundar
**************** 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