diff --git a/searchstax.module b/searchstax.module
index fc6dc94..fc9a849 100644
--- a/searchstax.module
+++ b/searchstax.module
@@ -13,6 +13,7 @@
 use Drupal\search_api\Query\ResultSet;
 use Drupal\search_api\SearchApiException;
 use Drupal\search_api_page\SearchApiPageInterface;
+use Solarium\Core\Query\QueryInterface as SolariumQueryInterface;
 
 /**
  * Implements hook_preprocess_HOOK() for the "views_view" template.
@@ -188,6 +189,49 @@ function _searchstax_add_tracking(ResultSet $result_set, array &$build = [], str
   $cache->applyTo($build);
 }
 
+/**
+ * Implements hook_search_api_solr_query_alter().
+ *
+ * If enabled and appropriate, re-routes all search requests through
+ * SearchStudio's /emselect handler.
+ */
+function searchstax_search_api_solr_query_alter(SolariumQueryInterface $solarium_query, QueryInterface $query) {
+  try {
+    // If, for some reason, a handler other than "/select" was set, don't alter
+    // this query.
+    if (($solarium_query->getHandler() ?: 'select') !== 'select') {
+      return;
+    }
+
+    // Check whether this is even a SearchStax server, and not a regular Solr
+    // server.
+    $config = $query->getIndex()->getServerInstance()->getBackendConfig();
+    $host = $config['connector_config']['host'] ?? '';
+    if (substr($host, -15) !== '.searchstax.com') {
+      return;
+    }
+
+    // Check whether user enabled re-routing searches to SearchStudio.
+    $enabled = \Drupal::config('searchstax.settings')
+      ->get('searches_via_searchstudio');
+    if (!$enabled) {
+      return;
+    }
+
+    $solarium_query->setHandler('emselect');
+
+    // Set the "defType=lucene" query parameter (unless the "defType" parameter
+    // is already set).
+    if (empty($solarium_query->getParams()['defType'])) {
+      $solarium_query->addParam('defType', 'lucene');
+    }
+  }
+  catch (SearchApiException $e) {
+    // Very unlikely, but just ignore if it happens – will cause other errors
+    // later in the page request.
+  }
+}
+
 /**
  * Implements hook_search_api_solr_config_files_alter().
  */
diff --git a/searchstax.services.yml b/searchstax.services.yml
index 348a0ed..389c02f 100644
--- a/searchstax.services.yml
+++ b/searchstax.services.yml
@@ -2,9 +2,3 @@ services:
   logger.channel.searchstax:
     parent: logger.channel_base
     arguments: [ 'searchstax' ]
-
-  searchstax.solarium_subscriber:
-    class: Drupal\searchstax\EventSubscriber\SolariumSubscriber
-    arguments: ['@config.factory', '@logger.channel.searchstax']
-    tags:
-      - { name: event_subscriber }
diff --git a/src/EventSubscriber/SolariumSubscriber.php b/src/EventSubscriber/SolariumSubscriber.php
deleted file mode 100644
index 2526c27..0000000
--- a/src/EventSubscriber/SolariumSubscriber.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-namespace Drupal\searchstax\EventSubscriber;
-
-use Drupal\Core\Logger\LoggerChannelInterface;
-use Drupal\search_api_solr\Solarium\EventDispatcher\EventProxy;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Drupal\Core\Config\ConfigFactoryInterface;
-use Solarium\Core\Event\PreExecuteRequest;
-
-/**
- * Changes the endpoint used for Solr search requests to SearchStudio.
- */
-class SolariumSubscriber implements EventSubscriberInterface {
-
-  /**
-   * The config factory.
-   *
-   * @var \Drupal\Core\Config\ConfigFactoryInterface
-   */
-  protected $configFactory;
-
-  /**
-   * The "searchstax" logger channel.
-   *
-   * @var \Drupal\Core\Logger\LoggerChannelInterface
-   */
-  protected $logger;
-
-  public function __construct(ConfigFactoryInterface $config_factory, LoggerChannelInterface $logger) {
-    $this->configFactory = $config_factory;
-    $this->logger = $logger;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getSubscribedEvents() {
-    return [
-      PreExecuteRequest::class => 'handlePreExecuteRequestEvent',
-    ];
-  }
-
-  /**
-   * Reacts to the Solarium "pre-execute request" event.
-   *
-   * @param \Solarium\Core\Event\PreExecuteRequest|\Drupal\search_api_solr\Solarium\EventDispatcher\EventProxy $event
-   *   The event.
-   */
-  public function handlePreExecuteRequestEvent($event) {
-    if (!($event instanceof PreExecuteRequest || $event instanceof EventProxy)) {
-      $vars = [
-        '@method' => '\Drupal\searchstax\EventSubscriber\SolariumSubscriber::handlePreExecuteRequestEvent()',
-        '@expected' => PreExecuteRequest::class,
-        '@actual' => is_object($event) ? get_class($event) : gettype($event) . ' (not an object)',
-      ];
-      $this->logger->error('@method received object of unexpected class for argument 1. Expected: @expected; actual: @actual.', $vars);
-      return;
-    }
-
-    // Re-route all "/select" requests to the "/emselect" SearchStudio handler.
-    $request = $event->getRequest();
-    $options = $request->getOptions();
-    if (($options['handler'] ?? NULL) === 'select') {
-      // Check whether this is even a SearchStax endpoint, and not a regular
-      // Solr server.
-      $host = $event->getEndpoint()->getHost();
-      if (substr($host, -15) !== '.searchstax.com') {
-        return;
-      }
-
-      // Check whether user enabled this behavior.
-      $enabled = $this->configFactory->get('searchstax.settings')
-        ->get('searches_via_searchstudio');
-      if (!$enabled) {
-        return;
-      }
-
-      $options['handler'] = 'emselect';
-      $request->setOptions($options);
-    }
-  }
-
-}
