MarkLogic 10 Product Documentation
admin:database-ruleset

admin:database-ruleset(
   $location as xs:string
) as element(db:default-ruleset)

Summary

The ruleset element (db:default-ruleset) created to be used for inference on a database. One or more rulesets can be used for inference. Rulesets are stored in the Schemas database. By default, no ruleset is configured.

Parameters
location The URI (location) of the ruleset.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $dbid := admin:database-get-id($config, "myDatabase")
  let $rules := admin:database-ruleset(("subClassOf.rules", "sameAs.rules"))
  let $c := admin:database-add-default-ruleset($config, $dbid, $rules)
   return admin:database-get-default-rulesets($c,$dbid)

  (: Specifies the ruleset or rulesets to be used. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy