MarkLogic Server 11.0 Product Documentation
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'.
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy