Loading TOC...

entity.dictionaryInsert

entity.dictionaryInsert(
   uri as String,
   dictionary as cts.entityDictionary
) as null

Summary

Put an entity dictionary into the database in the appropriate format.

Parameters
uri The URI of the dictionary.
dictionary The entity dictionary to insert.

Usage Notes

Important: When inserting a dictionary created from a SKOS graph, do not use the source graph URI for the dictionary URI. Doing so interferes with subsequent use of the graph.

See Also

Example

declareUpdate();
const entity = require('/MarkLogic/entity');

const entries = [];
for (let alt of ['ACA', 'Obamacare', 'Affordable Care Act']) {
  entries.push(cts.entity('E1', 'ACA', alt, 'Law'));
}
entity.dictionaryInsert('/ontology/ACA', cts.entityDictionary(entries));

// The new dictionary is inserted with the URI '/onotology/ACA'.
    

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