Loading TOC...

spell.addWord

spell.addWord(
   uri as String,
   word as String
) as null

Summary

Add the word $word to the dictionary at $uri.

Parameters
uri The URI of the dictionary.
word The word to add.

Example

  const spell = require("/MarkLogic/spell");
  declareUpdate();

  spell.addWord("/mySpell/spell.json", "WebDAV")

  => adds the word "WebDAV" to the specified dictionary
  

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