sem:store( [$options as xs:string*], [$query as cts:query?] ) as sem:store
The sem:store
function defines a set of criteria, that when evaluated,
selects a set of triples to be passed in to sem:sparql()
,
sem:sparql-update()
, or sem:sparql-values()
as part
of the options argument. The sem:store
constructor queries from the
current database's triple index, restricted by the options and the cts:query
argument (for instance, "triples in documents matching this query").
This function is a built-in.
Parameters | |
---|---|
options |
Options as a sequence of string values. Available options are:
|
query |
Only include triples in fragments selected by the cts:query .
The triples do not need to match the query, but they must occur in
fragments selected by the query.
The fragments are not filtered to ensure they match the query,
but instead selected in the same manner as
"unfiltered" cts:search operations. If a string
is entered, the string is treated as a cts:word-query of the
specified string.
|
Only one of "any", "document", "properties", or "locks" may be specified
in the options parameter. If none of "any", "document", "properties", or
"locks" are specified and there is a $query
parameter, then
the default is "document". If there is no $query
parameter
then the default is "any".
Options for "any", "document", "properties", "locks", "checked", or
"unchecked" must be specified as part of sem:store
, not
as part of sem:sparql
, sem:sparql-update
, or
sem:sparql-values
.
xquery version "1.0-ml"; import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; sem:store((), cts:word-query("Alfa Romeo")) => Returns a sem:store() containing all of the triples that exist in documents that match a query for "Alfa Romeo".
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.