diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php
index e1ad5c66e3d32ae0dad26642aca55094b0629b13..05be63182b1c0c8e3c08baa178242710ad07f318 100644
--- a/module/VuFind/src/VuFind/Controller/SearchController.php
+++ b/module/VuFind/src/VuFind/Controller/SearchController.php
@@ -30,9 +30,7 @@ namespace VuFind\Controller;
 use VuFind\Cache\Manager as CacheManager, VuFind\Config\Reader as ConfigReader,
     VuFind\Connection\Manager as ConnectionManager,
     VuFind\Db\Table\Search as SearchTable, VuFind\Exception\Mail as MailException,
-    VuFind\Mailer,
-    VuFind\Search\Memory, VuFind\Search\Solr\Params, VuFind\Search\Solr\Results,
-    VuFind\Solr\Utils as SolrUtils;
+    VuFind\Mailer, VuFind\Search\Memory, VuFind\Solr\Utils as SolrUtils;
 
 /**
  * Redirects the user to the appropriate default VuFind action.
@@ -507,17 +505,25 @@ class SearchController extends AbstractSearch
             // we may want to make this more flexible later.  Also keep in mind that
             // the template is currently looking for certain hard-coded fields; this
             // should also be made smarter.
-            $params = new Params();
+            $sm = $this->getSearchManager()->setSearchClassId('Solr');
+            $params = $sm->getParams();
             $params->initAdvancedFacets();
 
             // We only care about facet lists, so don't get any results (this helps
             // prevent problems with serialized File_MARC objects in the cache):
             $params->setLimit(0);
 
-            $results = new Results($params);
+            $results = $sm->getResults($params);
             $results->getResults();                     // force processing for cache
+
+            // Temporarily remove the service manager so we can cache the
+            // results (otherwise we'll get errors about serializing closures):
+            $results->unsetServiceLocator();
             $cache->setItem('solrSearchHomeFacets', $results);
         }
+
+        // Restore the real service locator to the object:
+        $results->restoreServiceLocator($this->getServiceLocator());
         return $results;
     }
 
diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php
index 0375dea9cef422b6ee13680267062cfe17179f14..171bcdd26e7b9f51b38e1483f8ada9627ebe300e 100644
--- a/module/VuFind/src/VuFind/Search/Base/Params.php
+++ b/module/VuFind/src/VuFind/Search/Base/Params.php
@@ -1505,12 +1505,27 @@ class Params implements ServiceLocatorAwareInterface
         return $this->selectedShards;
     }
 
+    /**
+     * Unset the service locator.
+     *
+     * @return Params
+     */
+    public function unsetServiceLocator()
+    {
+        $this->serviceLocator = null;
+        $options = $this->getOptions();
+        if (method_exists($options, 'unsetServiceLocator')) {
+            $params->unsetServiceLocator();
+        }
+        return $this;
+    }
+
     /**
      * Set the service locator.
      *
      * @param ServiceLocatorInterface $serviceLocator Locator to register
      *
-     * @return Manager
+     * @return Params
      */
     public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
     {
diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php
index 2378b1982edd900453c49b80f65f930d25b85d08..2c57073ee562619285429e4b36f8374cabb99b59 100644
--- a/module/VuFind/src/VuFind/Search/Base/Results.php
+++ b/module/VuFind/src/VuFind/Search/Base/Results.php
@@ -525,7 +525,7 @@ abstract class Results implements ServiceLocatorAwareInterface
      *
      * @param ServiceLocatorInterface $serviceLocator Locator to register
      *
-     * @return Manager
+     * @return Results
      */
     public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
     {
@@ -533,6 +533,46 @@ abstract class Results implements ServiceLocatorAwareInterface
         return $this;
     }
 
+    /**
+     * Restore the service locator (a cascading version of setServiceLocator()).
+     *
+     * @param ServiceLocatorInterface $serviceLocator Locator to register
+     *
+     * @return Results
+     */
+    public function restoreServiceLocator(ServiceLocatorInterface $serviceLocator)
+    {
+        $this->setServiceLocator($serviceLocator);
+        $params = $this->getParams();
+        if (method_exists($params, 'setServiceLocator')) {
+            $params->setServiceLocator($serviceLocator);
+        }
+        $options = $this->getOptions();
+        if (method_exists($options, 'setServiceLocator')) {
+            $params->setServiceLocator($serviceLocator);
+        }
+        return $this;
+    }
+
+    /**
+     * Unset the service locator.
+     *
+     * @return Results
+     */
+    public function unsetServiceLocator()
+    {
+        $this->serviceLocator = null;
+        $params = $this->getParams();
+        if (method_exists($params, 'unsetServiceLocator')) {
+            $params->unsetServiceLocator();
+        }
+        $options = $this->getOptions();
+        if (method_exists($options, 'unsetServiceLocator')) {
+            $params->unsetServiceLocator();
+        }
+        return $this;
+    }
+
     /**
      * Get the service locator.
      *