MarkLogic 12 EA 1 Product Documentation
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');
  const config = admin.getConfiguration()
  const dbid = admin.databaseGetId(config, "myDatabase")
  const rules = admin.databaseRuleset(("subClassOf.rules", "sameAs.rules"))
  const c = admin.databaseAddDefaultRuleset(config, dbid, rules)
   admin.databaseGetDefaultRulesets(c,dbid)

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