Highlight Query Terms in Search Results

A common search application requirement is to display the results with the matching terms highlighted, in bold or in a different color.

Note: You can configure highlighting on any meta, but it is mostly applied on the text and title metas, as they allow users to quickly identify whether the hit is interesting or not.

This task shows you how to:

Tutorial: Configure the Highlighting of Query Terms for the Description Meta

  1. In the Administration Console, go to Search > Search Logics > sl0.
  2. On the Hit Content tab, click the sales_description meta to display its settings.
  3. Click Customize.
  4. Select the Highlight check box.
  5. Click Apply.

Tutorial: Check the Highlighting of Query Terms

  1. Go to the Mashup UI search page: http://<HOSTNAME>:<BASEPORT>/mashup-ui /page/search?q=
  2. Enter the query nylon

In the search results, Nylon is highlighted in bold in the description meta.