Site search filter by category and highlight results

Silverstripe Version: 4*

Question:
Is it possible to refine the default search? I would like to include only the results from certain categories.
I would also like to highlight the the searched keyword and trim the text on both sides. So I would get ~ 100 characters before and ~100 characters after the highlighted keyword. I tried extending the ContentControllerSearchExtension but didn’t get it to work. Is there a simple way to filter the results and add <span class="highlight-keyword">keyword</span> or should I create the search from scratch?

If anyone is interested - I extended the search form
class MySearchForm extends SearchForm
and edited the $result

public function getResults() {
...
    foreach ($results as $result) {
       $result->Content = str_replace($keywords, '<span class="highlight-search-result">' . $keywords . '</span>', $result->Content);
    }
...
}