I believe you can do this using the REST Management API method PUT /manage/v2/databases/{dbid}/properties. If you pass a payload in which the range-element-indexes property is empty, I think it removes any existing ones.
Be careful, though: It’s a sharp tool. You’ll also delete pre-defined indexes like the ones for DLS. I think that’s also true of Tamas’ solution, but did not confirm.
If you enjoyed my content for some reason, I'd love to hear from you! Here are some options:
You could write some script to do this, for example in JavaScript which you need to execute from your Query Console:
The above goes through all the Element Range Indexes for the ‘Documents’ database and removes them - including any pre-defined Range Indexes for DLS.
I believe you can do this using the REST Management API method
PUT /manage/v2/databases/{dbid}/properties
. If you pass a payload in which therange-element-indexes
property is empty, I think it removes any existing ones.Take a look at the following:
http://docs.marklogic.com/REST/PUT/manage/v2/databases/[id-or-name]/properties
You’d want to use a payload similar to the following for XML:
Or like this for JSON:
Be careful, though: It’s a sharp tool. You’ll also delete pre-defined indexes like the ones for DLS. I think that’s also true of Tamas’ solution, but did not confirm.