Content Component 26.1
Content Component Help

# Highlight Terms

When you convert documents to HTML you can highlight link terms in the returned documents.

To highlight terms in a View action

1. Set the `Links` parameter in a `View` action to the name of the terms that you want to highlight.

2. Set the `StartTag` and `EndTag` parameters to the HTML tags to use to highlight the term.

For example:

    action=View&Reference=C:\Documents\report.doc&NoACI=True&Links=price&StartTag=<font color="red">&EndTag=</font>

When the View component receives this action, it sends the document text to the Content component as part of a `Highlight` Highlight action. For example:

    action=Highlight&Text=<document text>&Links=price&StartTag=<font color="red">&EndTag=</font>

The response from Content contains the specified HTML tags around the link terms, which View incorporates into the HTML conversion of the document.

In this example, View converts `report.doc` to HTML for viewing directly by the Web browser. In the returned document, all instances of the term `price` are highlighted using the HTML tags `<font color="red">` and `</font>`. For example:

    In some cases the <font color="red">price</font> has risen considerably.

When you view this document in a Web browser, these terms display in red text.

## Highlight Boolean Expressions

To use Boolean expressions in your link terms, set the `Boolean` parameter to `True` in the `View` action. This process is similar to setting the Boolean parameter to `True` for a Highlight action. The Content component then treats terms in the `Links` parameter as query text, rather than a list of terms. For example:

    action=View&Reference=C:\Documents\report.doc&NoACI=True&Boolean=True&Links=price AND risen&StartTag=<font color="red">&EndTag=</font>

This action highlights the terms `price` and `risen`, if both terms appear in the document.

If you use a proximity expression in `Links`, Content highlights only instances of the terms that meet the proximity requirements. You can also set the `Highlight` parameter to `Proximity` to highlight the whole proximity expression as a span, rather than highlighting each term individually.

## Highlight Expressions in Different Languages

You can specify the language type of the text in the `Links` parameter by adding the `LanguageType` parameter to the `View` action. This setting ensures that the Content component stems words correctly before highlighting.

Use this parameter if the language type of the text to highlight is not the same as the language type you set in the `DefaultLanguageType` configuration parameter. For example:

    action=View&Reference=C:\Documents\report.doc&NoACI=True&Links=price&StartTag=<font color="red">&EndTag=</font>&LanguageType=EnglishUTF8

## Highlight Multiple Link Terms

You can use the `MultiHighlight` action parameter to highlight different link terms with different HTML tags.

To highlight multiple terms with different HTML tags

1. In the `View` action, set `MultiHighlight` to `True`.

2. Set `Links` to a semicolon-separated list of terms or groups of terms.

3. Set `StartTag` and `EndTag` to a semicolon-separated list of opening and closing HTML tags respectively. The first pair of tags apply to the first link term, the second pair of tags apply to the second link term and so on.

For example:

    action=View&MultiHighlight=True&Links=dog+OR+cat;rabbit;"apples and pears"&StartTag=<b>;<i>;<font color="red">&EndTag=</b>;</i>;</font>&Boolean=True

This action highlights the terms `dog` or `cat` in bold, the term `rabbit` in italic, and the phrase `apples and pears` in red.

Copyright 2025 Open Text
Version 26.1 | Last updated January 2026

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 Content Component 26.1

Topic Title: Highlight Terms