Hi Dave, Thanks for the reply. I have created element-range-index on the element and using in sort-oder.
Now i came across a requirement where i will be using same element with 3 different namespaces. Instead of creating 3 element-range-index can i go with path-range-index there.So will that element use path-range-index also. Thanks, Manoj Viswanadha Cognizant-india On Wed, Nov 5, 2014 at 9:40 PM, Dave Cassel <dave.cas...@marklogic.com> wrote: > Manoj, > > Looking at the sort-order docs, I see this preface to the example: > > For example, the following specifies a primary sort order using the > element value for my-element (*which needs a string range index with the > specified collation*), and a secondary sort order of score ascending: > > > Sounds like a "yes" to me. > > Dave. > > -- > Dave Cassel > Developer Community Manager > MarkLogic Corporation <http://www.marklogic.com/> > Cell: +1-484-798-8720 > > > From: manoj viswanadha <manoj.viswana...@gmail.com> > Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com> > Date: Wednesday, November 5, 2014 at 10:53 AM > To: MarkLogic Developer Discussion <general@developer.marklogic.com> > Subject: Re: [MarkLogic Dev General] sorting in Marklogic Rest API > > 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" <dave.cas...@marklogic.com> 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 <manoj.viswana...@gmail.com> >> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com >> > >> Date: Tuesday, November 4, 2014 at 8:20 AM >> To: MarkLogic Developer Discussion <general@developer.marklogic.com> >> 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 >> General@developer.marklogic.com >> http://developer.marklogic.com/mailman/listinfo/general >> >> > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general