Add a Field to a Document

The following script demonstrates how to add a field named “MyField” to a document, with a value of “MyValue”.

Copy
function handler(config, document, params)
    document:addField("MyField", "MyValue");
    return true;
end