admin.databaseRuleset( location as String ) as element(db.defaultRuleset)
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. |
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.