Part of the Search ecosystem · 126 projects
Search API Switch moves a site from Drupal's core Search module to Search API in guided, reviewable and reversible steps. It keeps the existing search path, its keys query parameter and the search block's place on the page, so links, bookmarks and the page layout keep working.
Status: Stable. 1.0.0 is the first release. Try a switch on a copy of your site first: every step can be rolled back, but a copy shows you what it will change.
Why
Drupal 12 removes the Search module from core. The contributed Search project keeps core Search working, and if that is all your site needs, nothing has to move. Many sites would rather move to Search API; this module makes that move a reviewable plan instead of a weekend of hand-built servers, indexes, views and blocks.
Features
Plan
- Reads how core Search is set up (search pages and their paths, search blocks in every theme, rankings, content types and fields) and writes a plan you review in the UI or as Drush output before anything changes.
- Google Custom Search pages are listed and switched only if you select them (Google's JSON API closes on 1 January 2027).
Apply
- Creates a Search API server (database by default, or uses an existing one such as Solr) and a content index that mirrors what core indexed: the search-index view mode, minimum word length, CJK handling, HTML tag weights and core's rankings where Search API has an equivalent.
- Creates a view per content search page that answers on the core page's path with the same
keysparameter, page size and pager. - Places the view's search form block wherever each core search block sits, in every theme, with the same region, weight, label and visibility, and renders it the way the theme rendered core's block. The results page is rendered the way core's was: its title, the form above the results, the results list and each result use core's theme hooks, so the theme's own templates apply.
- Writes visitor-facing texts in every language the site has, and indexes content in batches.
Verify, cut over or roll back
- Compares both engines on sample queries before anything changes for visitors.
- Cuts over in one step, replacing any core search block placed since; uninstalling Search is a separate, confirmed step.
- Rolls back everything it created until Search is uninstalled. Everything is tracked by UUID, so a rollback never touches anything a site builder made, even configuration rebuilt under the same machine name.
Requirements
- Drupal 11.3 or later, or Drupal 12.
- Search API 1.43 or later, and core Views.
- The Search module: core on Drupal 11, or the contributed Search project on Drupal 12.
- Any database Drupal supports (MySQL/MariaDB, PostgreSQL, SQLite), any host, any theme.
Installation
Install with Composer, then enable the module:
composer require drupal/search_api_switch drush en search_api_switch
Configuration and permissions
Go to Administration » Configuration » Search and metadata » Switch to Search API (/admin/config/search/search-api-switch) and review the plan. Each step is also a Drush command: search-api-switch:plan, :apply, :index, :verify, :cutover, :rollback and :status.
- Administer the switch to Search API (restricted): plan, apply, verify, cut over and roll back the move. It creates and deletes search servers, indexes, views and blocks, and can uninstall the Search module.
What is not carried over
User search and help search pages are not switched; they keep working until Search is uninstalled. Core's advanced-search filters (f[]) and its upper-case OR are not carried over. A bundled theme compatibility submodule applies a theme's templates and alterations for core's search block and search page form to the replacement, titles the results page "Search for ..." and renders the results through core's own list and result theme hooks (also after Search is uninstalled, where it supplies the result hook itself), so a theme's overrides for them apply. Core's "About searching" help link is not carried over, and the snippet is Search API's excerpt, not core's, so its wording can differ. Theme code that reaches into core's search form in other ways may need a look, and the plan names each theme's templates. Menu links and templates that build core's search route by name need pointing at the path instead. The README has the full list.
Similar projects
Checked on drupal.org in November 2026.
- Search is core Search as a contributed project, with a 1.0.0 release for Drupal 11.5 and 12. Choose it if core Search does what your site needs; then nothing has to move.
- Search API Pages provides search pages built on Search API. It does not move existing core search configuration, blocks or URLs.
- Drupal CMS's search recipe adds Search API to a site, but does not migrate existing search pages, blocks or URLs.
Support and maintenance
Report bugs and ask for features in the issue queue. Each release has notes describing what changed.
This project is not covered by Drupal's security advisory policy. Until it is, security issues are handled in the public issue queue and fixed in ordinary releases.
A read-only mirror is on GitHub at DanePete/drupal-search-api-switch; development and issues stay on drupal.org.
Maintainer
Created and maintained by deadnorth (Dead North).
Ask your assistant about Search API Switch
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- Search API
- views Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Search ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 11 | PHP >=8.3 | Nov 27, 2026 |