We’d like to make solr search the default for the searchbar within pages.
by overriding the view/common/search-form.phtml file in the default theme we’re able to change the query from ?fulltext_search to ?q and then if I manually override the action of the form to point to a pre-defined solr-search page that I created in the search manager then I can get it pulling results from solr, but I can’t work out how to override that action.
switch ($searchType) {
case 'cross-site':
$searchAction = $this->url('site/cross-site-search', ['action' => 'results'], true);
break;
case 'sitewide':
default:
$searchAction = $this->url('site/resource', ['controller' => 'index', 'action' => 'search'], true);
}
If, in the search manager, I set the slug for my solr search to index/search to override the default search, any calls to it fail with the logs stating:
2024-12-19T15:00:38+00:00 ERR (3): Laminas\Router\Exception\RuntimeException: Route with name "search-page-index" not found in /home/sunny/Documents/omeka/omeka_dev/omeka-s/vendor/laminas/laminas-router/src/Http/TreeRouteStack.php:364
but I also can’t work out how I need to edit the $this->url() call in search-form.phtml in order for my default search bar to render with the form action “/s//solr-search”.
Any help would be greatly appreciated.