Hey, I have the basic idea of how to achieve creating a view based on the current indexes on a field, I just can’t tie all the pieces together so hoping someone can help!
When calling admin:database-get-range-element-indexes() it returns a bunch of XML defining the indexes. I want to loop through each index, retrieve some values (the XML looks something like: 2016-02-02 14:14:28.322 Info: TaskServer: <range-element-index xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/database"> 2016-02-02 14:14:28.322 Info: TaskServer: <scalar-type>int</scalar-type> 2016-02-02 14:14:28.322 Info: TaskServer: <collation/> 2016-02-02 14:14:28.322 Info: TaskServer: <namespace-uri/> 2016-02-02 14:14:28.322 Info: TaskServer: <localname>localname</localname> 2016-02-02 14:14:28.322 Info: TaskServer: <range-value-positions>true</range-value-positions> 2016-02-02 14:14:28.322 Info: TaskServer: <invalid-values>ignore</invalid-values> 2016-02-02 14:14:28.322 Info: TaskServer: </range-element-index> And store then in a sequence. I’ve tried the below to no luck, as my XQuery is not the strongest. Let $seq := () For $i in admin:database-get-range-element-indexes(admin:get-configuration(), xdmp:database(‘myDatabase’)) Return fn:insert-before($seq, 0, view:column($i/range-element-index/localname, $i/range-element-index/localname) But that doesn’t seem to work (there’s no error, it just doesn’t “do” anything). Does anyone have any ideas? Thanks, Ashley [cid:[email protected]] [cid:[email protected]] 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
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
