Results > View Documents > View Documents > Highlight Terms

Highlight Terms
When you convert documents to HTML you can highlight link terms in the returned documents.
To highlight terms in a View action
Set the Links parameter in a View action to the name of the terms that you want to highlight.
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 service receives this action, it sends the document text to the Content component as part of a 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. IDOL server 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.
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 IDOL server 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
In the View action, set MultiHighlight to true.
Set Links to a semicolon-separated list of terms or groups of terms.
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.