Loading TOC...


   $locations as xs:string*,
   [$store as sem:store*],
   [$options as xs:string*]
) as sem:store


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.

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



xquery version "1.0-ml";

import module namespace sem = "http://marklogic.com/semantics" 
      at "/MarkLogic/semantics.xqy";     

let $store := sem:store((), cts:word-query("Alfa Romeo"))
sem:ruleset-store("my-location", $store)
Returns a sem:store() derived from specified triples using
the specified ruleset.

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