diff --git a/src/Plugin/search_api/processor/RenderedItem.php b/src/Plugin/search_api/processor/RenderedItem.php
index 58fad966..00860d67 100644
--- a/src/Plugin/search_api/processor/RenderedItem.php
+++ b/src/Plugin/search_api/processor/RenderedItem.php
@@ -233,12 +233,6 @@ class RenderedItem extends ProcessorPluginBase {
 
     // Switch to the default theme in case the admin theme is enabled.
     $active_theme = $this->getThemeManager()->getActiveTheme();
-    $default_theme = $this->getConfigFactory()
-      ->get('system.theme')
-      ->get('default');
-    $default_theme = $this->getThemeInitializer()
-      ->getActiveThemeByName($default_theme);
-    $this->getThemeManager()->setActiveTheme($default_theme);
 
     // Count of items that don't have a view mode.
     $unset_view_modes = 0;
@@ -277,8 +271,6 @@ class RenderedItem extends ProcessorPluginBase {
 
     // Restore the original user.
     $this->currentUser->setAccount($original_user);
-    // Restore the original theme.
-    $this->getThemeManager()->setActiveTheme($active_theme);
 
     if ($unset_view_modes > 0) {
       $context = [
