Loading TOC...

thsr.insert

thsr.insert(
   uri as String,
   thsr as element(thsr.thesaurus)
) as null

Summary

Load the entries in $thsr into the thesaurus at $uri. If there is no document at $uri a new one will be created. If there is a document at $uri it will be overwritten.

Parameters
uri The URI of a thesaurus document.
thsr A thesaurus document.

Usage Notes

If $thsr contains XML that does not conform to the thesaurus schema, an error is raised.

Example

  var thsr = require("/MarkLogic/thesaurus");
  declareUpdate();

  thsr.insert("/myThsrDocs/roget.xml",  cts.doc("c:\thesaurus\roget.xml").root)
  

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