
entity.dictionaryInsert( uri as String, dictionary as cts.entityDictionary ) as null
Put an entity dictionary into the database in the appropriate format.
| Parameters | |
|---|---|
| uri | The URI of the dictionary. |
| dictionary | The entity dictionary to insert. |
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.