Loading TOC...

MarkLogic 12 EA 2 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. 
    

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