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

Can be used in these methods:
search, setSettings, browseObjects, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey

About this parameter# A

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

Usage notes#

Examples# A

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?
PHP v3