Connector Framework Server 25.1
Connector Framework Server Help

# Create Import and Index Tasks

Import tasks are configured in the `[ImportTasks]` section of the CFS configuration file. Import tasks run when files are imported, for example when a new item is retrieved from a repository or when the content of a file in a repository is updated. Use the `Pre` parameter to specify a list of tasks to run before File Content Extraction filtering, and the `Post` parameter to specify a list of tasks to run after File Content Extraction filtering.

Index tasks are configured in the `[IndexTasks]` section of the CFS configuration file. Use the `Update` parameter to specify a list of tasks to run when a connector instructs CFS to update the metadata of a document. Use the `Delete` parameter to specify a list of tasks to run when a connector instructs CFS to delete a document from indexes.

The tasks that you define run in sequence. In the following example, CFS creates an IDX file, then runs a Lua script, and then creates another IDX file:

    [ImportTasks]
    Post0=IdxWriter:C:\IDXArchive\before_script.idx
    Post1=Lua:C:\Scripts\my_script.lua
    Post2=IdxWriter:C:\IDXArchive\after_script.idx

To create an import task

1. Stop CFS.
2. Open the CFS configuration file.

3. Find the `[ImportTasks]` section of the configuration file, or create it if it does not exist.

4. Add the task by setting the `Pre` or `Post` parameter.

   The value of the `Pre` or `Post` parameter must be the name of the task that you want to run. Some tasks also require further information, such as the name of a file or the name of a section in the configuration file.

   For example, to run a Lua script before File Content Extraction filtering:

       [ImportTasks]
       Pre0=Lua:myscript.lua

5. Some import tasks require you to identify the documents to process by adding a field to the documents. For example, the `MediaServerAnalysis` task only runs on documents that have the `AUTN_NEEDS_MEDIA_SERVER_ANALYSIS` field. For more information about the document fields that are used with import tasks, see Document Fields for Import Tasks.

   To add a field to the documents that you want to process, use a Lua script. In the following example, a Lua script named `Filter.Lua` runs before a `MediaServerAnalysis` task, to identify suitable documents and add the field `AUTN_NEEDS_MEDIA_SERVER_ANALYSIS`.

       [ImportTasks]
       Pre0=Lua:Filter.lua
       Pre1=MediaServerAnalysis:MediaServerSettings

6. Save the configuration file and restart CFS.

To create an index task

1. Stop CFS.
2. Open the CFS configuration file.

3. Find the `[IndexTasks]` section of the configuration file, or create it if it does not exist.

4. Add the task by setting the `Update` or `Delete` parameter.

   The value of the `Update` or `Delete` parameter must be the name of the task that you want to run. Some tasks also require further information, such as the name of a file or the name of a section in the configuration file.

   For example:

       [IndexTasks]
       Update0=Lua:myscript.lua

5. Save the configuration file and restart CFS.

Copyright 2024 Open Text
Version 25.1 | Last updated January 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 Connector Framework Server 25.1

Topic Title: Create Import and Index Tasks