Hi dave,

Thanks for ur reply. I tried using field and it worked fine. I have a quick
question here. If i use element for sorting and if i have
element-range-index configured for that element. Does the element use index
there?

Thanks,
Manoj
On 4 Nov 2014 21:14, "Dave Cassel" <[email protected]> wrote:

>   Hi Manoj,
>
>  The sort-order documentation
> <http://docs.marklogic.com/guide/rest-dev/appendixb#id_33716> says that
> sort-order "must have one of a single element child, a single score child,
> a single field child, or a single json-key child." You could build a
> field based on your path range index and sort based on the field.
>
>  Dave.
>
>  --
> Dave Cassel
> Developer Community Manager
> MarkLogic Corporation <http://www.marklogic.com/>
> Cell:  +1-484-798-8720
>
>
>   From: manoj viswanadha <[email protected]>
> Reply-To: MarkLogic Developer Discussion <[email protected]>
> Date: Tuesday, November 4, 2014 at 8:20 AM
> To: MarkLogic Developer Discussion <[email protected]>
> Subject: [MarkLogic Dev General] sorting in Marklogic Rest API
>
>   Hi,
>
>  I am using marklogic Rest API for sorting the results ascending and
> descending
> using options called operator. Inside operator i defined two states one
> for ascending and other for descending.
>
>  For sorting i used sort-order inside the states and when i use element
> everything is working as expected but when i try to use path range index
> inside sort-order its not sorting the results.
>
>  Can anyone give some idea if we can use sort-order with range indexes.
>
>
>  Thanks,
> Manoj Viswanadha
> Cognizant.
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to