Just to add to the below, I removed the index I added and re-ran the check-options and it comes up with a suggestion for an index… which is the exact index I had added. I re-added it, re-ran the check and nothing comes back suggesting I added the right index.
I restarted the MarkLogic service, and even after that I still get the same response from the API as per below so somewhat stumped! Ashley [cid:imagea4201f.PNG@8d9d3b01.4694fa2c] [cid:imageb92b6e.PNG@9168a1bb.4dab58b3] Ashley Peacock Developer II Elevate Credit International Limited P: 01284 717800 | Ext: 877 | Elevate.co.uk<http://elevate.co.uk> Amadeus House, Floral Street, Covent Garden, London WC2E 9DP Privileged and Confidential. This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain privileged and/or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited. Elevate Credit International Limited is registered in England & Wales with Company Number 05041905. Registered Office: 27-28 Eastcastle Street, London, W1W 8DH From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ashley Peacock Sent: 25 November 2015 15:44 To: general@developer.marklogic.com Subject: [MarkLogic Dev General] SEARCH-BADORDERBY Hey, I have added the following search option: <options xmlns="http://marklogic.com/appservices/search"><sort-order type="xs:dateTime" direction="descending"><element ns="" name="insert_timestamp"/><annotation>Order by the timestamp, descending</annotation></sort-order></options> If I then query using that search option, I get the following result: {"errorResponse":{"statusCode":400, "status":"Bad Request", "messageCode":"SEARCH-BADORDERBY", "message":"SEARCH-BADORDERBY: (err:FOER0000) Indexes are required to support element, element-attribute, json-property, or field sort specifications."}} I’ve added an element range index to the field it’s querying on (and it’s re-indexed), and it still throws the same error. It said in the docs I could check the index required using: search:check-options( <options xmlns="http://marklogic.com/appservices/search"><sort-order type="xs:dateTime" direction="descending"><element ns="" name="insert_timestamp"/><annotation>Order by the timestamp, descending</annotation></sort-order></options>, true() ) But that yielded no result (“your query returned an empty sequence”) which makes me think the index is correct… yet it still throws the same error. Does anyone have any ideas? Thanks, Ashley [cid:image002.jpg@01D1279A.E0C3A4E0] [cid:image003.png@01D1279A.E0C3A4E0] Ashley Peacock Developer II Elevate Credit International Limited P: 01284 717800 | Ext: 877 | Elevate.co.uk<http://elevate.co.uk> Amadeus House, Floral Street, Covent Garden, London WC2E 9DP Privileged and Confidential. This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain privileged and/or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited. Elevate Credit International Limited is registered in England & Wales with Company Number 05041905. Registered Office: 27-28 Eastcastle Street, London, W1W 8DH Click here<https://www.mailcontrol.com/sr/7AmiNuPOlljGX2PQPOmvUmuFhuAgpUQ2de42Ozqoni8W2Wz4rmzPyDPi7XX!24hFyrF0K9sQw3yGoJj9+I0bOg==> to report this email as spam.
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general