dachcom-digital/pimcore-dynamic-search-index-provider-lucene

How to highlight search term in result HTML?

alexej-d opened this issue · 1 comments

Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? no

I was wondering if there is any documentation on how to highlight the search term in the results? I saw that the AbstractQuery class has a highlightMatches method. Do you use it in a channel action?

This is not implement by default. Since thehighlightMatches is just a simple helper, you could create your own twig helper for that or using a dynamic_search.document_normalizer to modify your result!