Loading TOC...

MarkLogic Server 11.0 Product Documentation
thsr:remove-entry

thsr:remove-entry(
   $uri as xs:string*,
   $entry as item()
) as empty-sequence()

Summary

Removes all entries that exactly match $entry from the thesaurus documents(s) at $uri.

Parameters
uri The URI of the thesaurus document(s).
$entry A thesaurus entry, can either be an xml element or javascript object.

Example

  xquery version "1.0-ml";
  import module namespace 
	thsr="http://marklogic.com/xdmp/thesaurus" 
                             at "/MarkLogic/thesaurus.xqy";

   (: removes the second "Car" entry from the thesaurus document :)
  thsr:remove-entry("/myThsrDocs/roget.xml", 
            thsr:lookup("/myThsrDocs/roget.xml","Car")[2])
  

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