I have a database index in the Search API. In this I am indexing rendered HTML in a node type with paragraphs. I have set the filter for highlighting. For the output of the search I use a view. Displaying the search results works as expected. However, the complete paragraph is always displayed if the searched term is in it. If this term now occurs in 3 paragraphs, these all are displayed completely and the result list becomes extremely long and confusing.
If I shorten the output in the view, the output is shortened to the set length from the beginning. If I then shorten to 600 characters and the highlighted term appears only after these 600 characters, the term is no longer visible in the search result.
Is there a way to shorten the output before and after the highlighted term?