Hit Highlighting

This topic explains how to use the hit-highlighting option to highlight request query terms within results.

Hit Highlighting Characters

When EnableHighlighting is set in SearchOption Enumeration (Bing, Version 2.0), Bing uses special characters to identify the beginning and the end of a query term that appears in results. These characters are E000 and E001, respectively.

For example, if the value for SearchRequest.Query Property (Bing, Version 2.0) is msdn blogs, then occurrences of either msdn or blogs are highlighted in search results, as shown in the following figure:

Hit-Highlighting characters

Replacing Highlighting Characters

The characters that identify the beginning and end of a highlighted term can be replaced with characters appropriate to the given display format. For example, you might replace E000 with <strong> and E001 with </strong>, respectively. For examples that implement this substitution, see these code samples:

Supported SourceTypes

The following SourceTypes support the Hit Highlighting option: