Coveo Knowledge Base – Information Article – 060331-1

CES4-060331-1: Conversion Script Objects Reference

The information in this technical note applies to:

Coveo Enterprise Search 4

Summary

This document contains complementary information about conversion script objects.

Definitions
Enumerations
Available Scripting Objects

Definitions

A conversion script is a script file (whether a vbscript or a jscript file) that can manage extracted document content and/or properties. Theses are run by Coveo Enterprise Search at some specific point in the conversion process. When a script is executed by Coveo Enterprise Search, the script has access to some proprietary scripting objects used to manipulate the document content and properties.

A global variable is a variable that can be stored by the conversion script in the memory of the converter manager. It’s useful to store a value or an object that you would have to create every time a conversion script runs. All scripts are sharing the same global variable set. These variables will be released when the converter manager is shut down or when a script is refreshed.

A script parameter is a parameter that is sent to the conversion script when it’s executed. Script parameters can be set on a physical index and/or on a source to customize the script at run time. As an example, if you need many similar script files to convert documents from many sources, you could have a single script file and pass to this script some parameters to determine the behavior of the script. The script parameters can’t be set in the Coveo Enterprise Search administration tool, you will have to manually modify the Coveo Enterprise Search configuration files.

Enumerations

These enumeration values can be used within the conversion scripts.

·          SeverityEnumeration

This enumeration refers to the severity of the message when using the Trace method. This method is available PreConversion, CustomConversion and PostConversion objects.

Values:

o         SeverityNormal (0)

o         SeverityImportant (1)

o         SeverityWarning (2)

o         SeverityError (3)

o         SeverityFatal (4)

·          Charsets

This enumeration refers to the charset type of the string you read ReadByteString method. This method is available BinaryData object.

Values:

o         NO_CHARSET (0)

o         CP1252_CHARSET (1)

o         UTF8_CHARSET (2)

Available scripting objects

These objects can be used within the conversion scripts.

·          BinaryData

This object allows the manipulation of a binary stream

·          PreConversion

This object manages Pre-Conversion settings.         

·          CustomConversion

This object manages Custom Conversion settings.

·          PostConversion

This object manages Post-Conversion settings.

·          DocumentInfo

This object manages extracted document properties.

·          Mutex

This utility object allows you to serialize the process.

·          IFilterWrapper

This object contains utility methods to handle system IFilters.

 

See Pre-Convertion Script Objects Reference, Custom Converter Script Objects Reference or Post-Convertion Script Objects Reference to get more specific lists of all available conversion script objects.