Product DocsMenu

Adding a Postconversion Script

Postconversion scripts, written in .NET, VBScript, or JScript, are used to manipulate document properties after the conversion (see Postconversion Scripts).

Example: With a postconversion script, you can update the document concepts and summary sentences (see Updating Document Concepts and Summary Sentences).

To add a postconversion script

  1. On the Coveo server, access the Administration Tool (see Opening the Administration Tool).

  2. Select Configuration > Converters.

  3. In the Converter Managers page, in the navigation panel on the left, click Conversion Scripts.

  4. In the Conversion Scripts page is displayed, above the Postconversion Scripts section, click Add.

  5. In the Add a Postconversion Script page:

    1. In the Name box, enter a name to identify the conversion script.

    2. In the Script File box, click to browse or enter the complete path of the conversion script file.

      Tip: It is a good practice to store conversion script files under the [Index_Path]\Config\ folder (such as in C:\CES7\Config\Scripts\) so that your script files are backed up with the other configuration files (see Backing Up and Restoring the CES Configuration Files).

      Note: For .NET scripts, you can select the DLL or the .cs file, in which case, CES automatically compiles the file on-demand. Furthermore, when you update the source file, CES automatically uses the updated file so you do not need to explicitly reload the .NET script file from the Administration Tool.

    3. In the Script Language drop-down list, select the language in which the conversion script is written.

      Note: When selecting JScript, ensure that your code uses only statements supported by JScript, the Microsoft JavaScript dialect (see JScript Reference).

      Example: JScript does not support the JavaScript forEach statement. You must rather use more basic loop statements (see Loops in JScript).

    4. When the Script Language is set to .NET, in the Type Name box, enter the name of the class in the .NET assembly that implements the conversion script (see About .NET Conversion Scripts).

    5. If the conversion script requires one or more parameters, for each parameter, in the Parameters section, click Add Parameter, and then enter the name and value of the parameter.

    6. Click Save.

      CES 7.0.9434+ (September 2018) Once you apply the script to a source, on the script page, the source name will appear next to Used By.

What's Next?

Apply the conversion script globally to all collections and sources of the index or to a specific source (see Applying a Global Conversion Script and Applying a Source Conversion Script).

People who viewed this topic also viewed