Media Server 25.4
Media Server Help

# LuaScript

A Lua script to run to determine whether a record or group of records is included in the output from the ESP task.

Specify one of the following:

- the absolute path to the Lua script file. To strengthen security, Media Server can be configured to read files only from specified directories. For information about the directories that Media Server is permitted to read from, see the parameter AllowedInputDirectories.
- the path to the Lua script file, relative to the LuaDirectory.
- a string that matches one of your `AdditionalDataLabels`, (if you use the `AdditionalData` and `AdditionalDataLabels` action parameters to upload the Lua script file as part of the Process action).

The script must define a function with the name `pred`. The function must return either `true` or `false`.

The response to the result of the function depends on the type of ESP task.

ESP task | Result if the function returns true
--- | ---
And / AndThen | The group of records is included in the engine output track.
AndAny / AndThenAny | The record in the `Input0` track is included in the output. (Records from the other tracks are never included in the output).
AndNot / AndNotThen | The record in the `Input0` track is discarded. (Records from the other tracks are never included in the output).
Combine | The record is combined with the record in the `Input0` track, so that it is included in the result when the record from `Input0` is output.
Deduplicate | The second record is discarded.
Filter | The record is included in the engine output track.

For more information about writing Lua scripts for event stream processing, see Write a Lua Script for an ESP Engine.

Type: | String
Default: |
Required: | No
Configuration Section: | TaskName
Example: | `LuaScript=breakingnews.lua`
See Also: |

Copyright 2025 Open Text
Version 25.4 | Last updated October 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 Media Server 25.4

Topic Title: LuaScript