Open topic with navigation

Use Your Content > Investigate > Highlight Results

# Highlight Results

HPE IDOL Server is able to highlight text in three of its actions. It can highlight:

- text supplied in the `Text` parameter of the `Highlight` action.

- document content in the results of the Query action.

- the HTML output of the View action.

The behavior of highlighting is broadly similar across these operations. HPE IDOL Server determines highlight matches using language rules (similar to query matches) and then surrounds these matches with a start tag and end tag of your choice.

For example, you might use HTML markup as start and end tags to display the output in a Web browser, with specified terms rendered to stand out visually.

Although highlighting functionality is used by a number of HPE products, the logic that HPE IDOL uses to find matches to highlight (and insert markup) is typically performed by the HPE IDOL Server Content component.

## Highlight Effectively

Highlighting uses HPE IDOL language capabilities. For example, it uses stemming so that you do not have to specify various forms of a term.

For more precise highlighting, you can use Boolean and proximity operators, to take advantage of IDOL advanced query syntax.

In the `Highlight` action, if you supply HTML content to highlight, you must set `XMLFormat` to `True` to instruct IDOL to take into account the structure of markup languages (so that the result is still valid XML or HTML).

If highlighting is not working as expected, it might be helpful to test using the `Highlight` action directly with your Content component. In particular, check the language configuration, and specify the `LanguageType` parameter explicitly in the action.

## Highlight with the View action

The HPE IDOL `View` action uses the Content component `Highlight` action to highlight terms. Therefore, you can approach it in much the same way.

Because of this, the configuration of the Content component might influence the behavior of the `View` component highlighting. The `View` component generally processes HTML, so it always uses the `XMLFormat` option in the action it sends to Content. It allows you to supply multiple start tag and end tag pairs so that you can highlight each term with a different visual style.

## Examples

Here are examples of each highlighting action. For more details about parameters, refer to the IDOL Server Reference.

- Wrap a single word in an arbitrary string in default start and end tags:

      action=highlight&text=IDOL+Server+can+highlight+text&links=server

  Output:

      <autn:content>
         IDOL <font color=red>Server</font> can highlight text
      </autn:content>

- Surround the matching text in a query action specifying `StartTag` and `EndTag`.

  Note: Note that matching is matched by match:

      action=query&text=match+highlight&=terms&printfields=drecontent&starttag=*&endtag=*

  Output:

      <DRECONTENT>
         This is sample text for *matching*. Hopefully you can see your *matches* *highlighted*.
      </DRECONTENT>

- Decorate some search terms in a converted document with the `View` action:

  Note: The `StartTag` and `EndTag` parameters should be URL encoded, but are left plain in this example for clarity.

      action=view&reference=C:/viewing.pdf&links=viewing;service&noaci=True&multihighlight=True&starttag=<b>;<i>&endtag=</b>;</i>

  Output:

      <html>
      ... <b>Viewing</b> <i>Service</i> ...
      </html>

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm