API Reference / API Parameters / highlightPreTag
Jan. 14, 2019

highlightPreTag

Type: string
Engine default: “
Parameter syntax
'highlightPreTag' => 'opening_tag'

Can be used in these methods:

About this parameter

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

Usage notes:

Examples

Set default highlight pre tag

1
2
3
$index->setSettings([
  'highlightPreTag' => '<em>'
]);
1
2
3
$results = $index->search('query', [
  'highlightPreTag' => '<strong>'
]);

Did you find this page helpful?