Store Content in IDOL Server > Process Data before you Index > Use Lua Script Index Tasks > Add an Attribute to a Field

Add an Attribute to a Field
The addAttribute document function adds an attribute to an XML field when passed a field object, attribute name and attribute value.
For example:
document:addAttribute(“field”,”MY_ATTRIBUTE”,”123”)