protected function getSearchQuery($keywords, $classes)
    {
        $query = new SearchQuery();
        $query->classes = $classes;
        $query->addSearchTerm($keywords);
        $query->addExclude(SiteTree::class . '_ShowInSearch', 0);

        // Artificially lower the amount of results to prevent too high resource usage.
        // on subsequent canView check loop.
        $query->setLimit(100);

        // Allow user code to modify the search query before returning it
        $this->extend('updateSearchQuery', $query);

        return $query;
    }