
thsr:set-entry( $uri as xs:string, $entry as item() ) as empty-sequence()
Adds the entry $entry to the thesaurus at $uri.
| Parameters | |
|---|---|
| uri | The URI of a thesaurus document. |
| $entry | An entry to add to the thesaurus, can either be an xml element or javascript object. |
install_dir/Config/thesaurus.xsd), an error
is raised.
xquery version "1.0-ml";
import module namespace
thsr="http://marklogic.com/xdmp/thesaurus"
at "/MarkLogic/thesaurus.xqy";
thsr:set-entry("/myThsrDocs/roget.xml",
<entry xmlns="http://marklogic.com/xdmp/thesaurus">
<term>Car</term>
<part-of-speech>noun</part-of-speech>
<synonym>
<term>Ford</term>
<part-of-speech>noun</part-of-speech>
</synonym>
<synonym>
<term>automobile</term>
<part-of-speech>noun</part-of-speech>
</synonym>
<synonym>
<term>Fiat</term>
<part-of-speech>noun</part-of-speech>
</synonym>
</entry>)