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'); 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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.