Hi Eric, Yes, range index is there for that field. --Shan.
On Wed, Jan 4, 2017 at 2:03 PM, Shiv Shankar <shiv.shivshan...@gmail.com> wrote: > Thanks Eric, > With this change, I could get the data, but no order change though the > sort-order specified ascending/descending. > Lets say firstName is "abc", "xyz", the query returning the response in > the same order irrespective of sort-order. Am I missing anything? > > Regards > Shan. > > On Wed, Jan 4, 2017 at 12:05 PM, Shiv Shankar <shiv.shivshan...@gmail.com> > wrote: > >> Hi, >> I am trying to use sort-order in $query. It is returning 0 records. All >> my documents are JSON. Any inputs? >> >> {"$query":{"options":{"sort-order":[{"direction":"descending >> ","element":{"name":"firstName","score": null}}]}}} >> >> Tried with >> {"$query":{"options":{"sort-order":[{"direction":"descending >> ","json-property":"firstName"}]}}} >> >> Note: I created Index on that field too. >> >> >> Regards >> Shan. >> > >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general