diff --git a/src/Plugin/search_api/processor/RenderedItem.php b/src/Plugin/search_api/processor/RenderedItem.php
index 21427cd..3496e66 100644
--- a/src/Plugin/search_api/processor/RenderedItem.php
+++ b/src/Plugin/search_api/processor/RenderedItem.php
@@ -2,12 +2,15 @@
 
 namespace Drupal\search_api\Plugin\search_api\processor;
 
+use Drupal\Core\Config\Config;
 use Drupal\Core\Entity\Entity\EntityViewMode;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\RendererInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Session\AccountProxyInterface;
 use Drupal\Core\Session\UserSession;
+use Drupal\Core\Theme\ThemeInitializationInterface;
+use Drupal\Core\Theme\ThemeManagerInterface;
 use Drupal\Core\TypedData\DataDefinition;
 use Drupal\search_api\Datasource\DatasourceInterface;
 use Drupal\search_api\Processor\ProcessorPluginBase;
@@ -51,6 +54,27 @@ class RenderedItem extends ProcessorPluginBase {
   protected $logger;
 
   /**
+   * Theme manager service.
+   *
+   * @var \Drupal\Core\Theme\ThemeManagerInterface
+   */
+  protected $themeManager;
+
+  /**
+   * Theme initialization service.
+   *
+   * @var \Drupal\Core\Theme\ThemeInitializationInterface
+   */
+  protected $themeInitialization;
+
+  /**
+   * Theme settings config.
+   *
+   * @var \Drupal\Core\Config\Config
+   */
+  protected $themeSettings;
+
+  /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
@@ -69,6 +93,10 @@ public static function create(ContainerInterface $container, array $configuratio
     $logger = $container->get('logger.factory')->get('search_api');
     $plugin->setLogger($logger);
 
+    $plugin->setThemeManager($container->get('theme.manager'));
+    $plugin->setThemeInitializer($container->get('theme.initialization'));
+    $plugin->setThemeSettings($container->get('config.factory')->get('system.theme'));
+
     return $plugin;
   }
 
@@ -141,6 +169,36 @@ public function setLogger(LoggerInterface $logger) {
     return $this;
   }
 
+  /**
+   * Sets the theme manager.
+   *
+   * @param \Drupal\Core\Theme\ThemeManagerInterface $theme_manager
+   *   Theme manager.
+   */
+  protected function setThemeManager(ThemeManagerInterface $theme_manager) {
+    $this->themeManager = $theme_manager;
+  }
+
+  /**
+   * Sets the theme initialization service.
+   *
+   * @param \Drupal\Core\Theme\ThemeInitializationInterface $theme_initialization
+   *   Theme initialization service.
+   */
+  protected function setThemeInitializer(ThemeInitializationInterface $theme_initialization) {
+    $this->themeInitialization = $theme_initialization;
+  }
+
+  /**
+   * Sets the theme settings config object.
+   *
+   * @param \Drupal\Core\Config\Config $theme_settings
+   *   Theme settings.
+   */
+  protected function setThemeSettings(Config $theme_settings) {
+    $this->themeSettings = $theme_settings;
+  }
+
   // @todo Add a supportsIndex() implementation that checks whether there is
   //   actually any datasource present which supports viewing.
 
@@ -245,6 +303,11 @@ public function preprocessIndexItems(array &$items) {
     // Count of items that don't have a view mode.
     $unset_view_modes = 0;
 
+    // Switch to the default theme in case the admin theme is enabled.
+    $active_theme = $this->themeManager->getActiveTheme();
+    $default_theme = $this->themeSettings->get('default');
+    $this->themeManager->setActiveTheme($this->themeInitialization->getActiveThemeByName($default_theme));
+
     // Annoyingly, this doc comment is needed for PHPStorm. See
     // http://youtrack.jetbrains.com/issue/WI-23586
     /** @var \Drupal\search_api\Item\ItemInterface $item */
@@ -285,6 +348,8 @@ public function preprocessIndexItems(array &$items) {
 
     // Restore the original user.
     $this->currentUser->setAccount($original_user);
+    // Restore the original theme.
+    $this->themeManager->setActiveTheme($active_theme);
   }
 
   /**
