MarkLogic 12 EA 1 Product Documentation
sem.rulesetStore

sem.rulesetStore(
   locations as String[],
   [store as sem.store[]],
   [options as String[]]
) as sem.store

Summary

The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in $store ("the triples that can be inferred from these rules").

If graph URIs are included with a sem:sparql query that includes sem:ruleset-store, the query will include "triples in the $store that are also in these graphs".

This function is a built-in.

Parameters
locations The locations of the rulesets.
store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database.
options Options as a sequence of string values. Available options are:
"size=number of MB"
The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE].

Required Privileges

http://marklogic.com/xdmp/privileges/sem-sparql

Example

var sem = require("/MarkLogic/semantics.xqy");     

var store = sem.store(null, cts.wordQuery("Alfa Romeo"));
sem.rulesetStore("my-location", store);
=>
Returns a sem:store() derived from specified triples using
the specified ruleset.
Powered by MarkLogic Server | Terms of Use | Privacy Policy