API Reference / API Parameters / highlightPostTag
Type: string
Engine default: "</em>"
Parameter syntax
'highlightPostTag' => 'closing_tag'

Can be used in these methods:

About this parameter

The HTML string to insert after the highlighted parts in all highlight and snippet results.

Usage notes

Examples

Set default highlight post tag

1
2
3
$index->setSettings([
  'highlightPostTag' => '</em>'
]);

Override default highlight post tag for the current search

1
2
3
$results = $index->search('query', [
  'highlightPostTag' => '</strong>'
]);
Did you find this page helpful?