IBM Seedlist Connector 25.2
IBM Seedlist Connector Help

# CollectMhtFilterLua

The path of a Lua script to use to determine whether documents are collected as MHT files.

By default, the `collect` action returns an IDX file that contains the content of the page in its fields. The content is there, but might not be as easy to view as the document in HTML format. When you set this parameter, the specified script is used to determine whether the document is collected in MHT format.

The following is a sample script:

    function handler(document)
       local url = document:getFieldValue(“src”);
       local extension = string.match(url, "^.*%.([^%.]+)$");

       if(extension == nil) then return false end;
       if(extension == "html" or extension == "htm") then return true end;

       return false
    end

When you run the `collect` action for a document, the connector calls the specified Lua script. The document is passed to the `handler` function. If the function returns true, the connector generates an MHT file of the content of the Web page and this is returned by the `collect` along with the IDX. If the function returns `false`, only the IDX is returned.

Type: | String
Default: |
Required: | No
Configuration Section: | TaskName or FetchTasks or Default
Example: | `CollectMhtFilterLua=MhtFilter.lua`
See Also: |

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery IBM Seedlist Connector 25.2

Topic Title: CollectMhtFilterLua