Loading TOC...

admin:database-delete-geospatial-region-path-index

admin:database-delete-geospatial-region-path-index(
   $config as element(configuration),
   $database-id as xs:unsignedLong,
   $geospatial-region-path-indexes as element(db:geospatial-region-path-index)*
) as element(configuration)

Summary

This function deletes a geospatial region path index to the specified database in the configuration.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the database ( for example, xdmp:database("myDatabase") ).
geospatial-region-path-indexes A geospatial path index specification, typically the result of calling admin:database-geospatial-region-path-index.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin/database

http://marklogic.com/xdmp/privileges/admin/database/{id}

http://marklogic.com/xdmp/privileges/admin/database/index

http://marklogic.com/xdmp/privileges/admin/database/index/{id}

Usage Notes

The index is not removed until you pass the modified configuration to admin:save-configuration. You can also pass the modified configuration to another Admin API function to make additional configuration changes.

Example


xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
          at "/MarkLogic/admin.xqy";

let $config := admin:get-configuration()
return admin:save-configuration(
  admin:database-delete-geospatial-region-path-index(
    $config, admin:database-get-id($config, "geo"),
    admin:database-geospatial-region-path-index(
      "//kml:LinearRing/kml:coordinates",
      "wgs84", 2, "reject", "miles")
  )
)

(: Removes a geospatial region path index from the database named "geo". :)
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.