Loading TOC...

admin.databaseRuleset

admin.databaseRuleset(
   $location as String
) as element(db.defaultRuleset)

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

  
  const admin = require('/MarkLogic/admin.xqy');
  var config = admin.getConfiguration()
  var dbid = admin.databaseGetId(config, "myDatabase")
  var rules = admin.databaseRuleset(("subClassOf.rules", "sameAs.rules"))
  var c = admin.databaseAddDefaultRuleset(config, dbid, rules)
   admin.databaseGetDefaultRulesets(c,dbid)

   //Specifies the ruleset or rulesets to be used. 
    

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