Instantsearch.js highlight custom tags

Hi, I am using the highlight helper function in instantsearch.js. I have “highlight prefix tag” and “highlight postfix tag” set in the index configuration (via the dashboard), but the highlighted results just show with the default tag mark class=“ais-Highlight-highlighted”. I know I can use the highlightedTagName parameter to set it in my code, but I thought the point of the index-level setting was that I didn’t have to do that. Any guidance you can provide would be appreciated. Thanks!

Hi,

highlightPreTag and highlightPostTag have no effect if you’re using InstantSearch.js (it overrides these settings with its owns) so you have to manually specify the highlightedTagName if you want to change the default tag.

1 Like