Store Content in IDOL Server > Process Data before you Index > Use Lua Script Index Tasks > Sections

The document object passed to the script's handler function in fact represents the first section of the document. This means the functions previously detailed only read and modify the first section.
To perform operations on every section, use the getNextSection function. For example:
local section = document
while section do
-- Manipulate section
section = section:getNextSection()
There is currently no support for adding or removing sections. Only IDX documents are sectioned.