Search API
A contributed module, separate from core's Search module, that indexes chosen entity data on a pluggable server such as the database or Solr.
Search API is a contributed Drupal module that builds search on top of Drupal's entities. It copies the data you choose, such as the title and body of every article, into an index kept by a search engine, and a view then queries that index. Because the engine is a pluggable backend, the same setup works with a database or with Solr.
How Search API works in Drupal 11
Release 8.x-1.42, published on 11 October 2026, declares support for Drupal 10.3 and later, 11 and 12. It is installed with Composer (composer require 'drupal/search_api'). Its administration page is at /admin/config/search/search-api. The documentation describes a few building blocks:
- A server is a concrete way to store and search data. Its backend decides how; the backend is chosen when the server is created and cannot be changed later.
- An index is a configuration object attached to a server. It lists the datasources to index, such as content or users, and the fields to keep. Each field has a data type; Fulltext fields can be searched by keyword.
- Processors prepare indexed data and search queries. Examples are Ignore case, Content access and Entity status.
The module ships one backend, Database search, which the project page calls ready to use. It has a known limit: facets and autocomplete need the database user to hold the CREATE TEMPORARY TABLES permission. Solr, Elasticsearch and others are separate projects.
Items are indexed in batches during cron, or immediately if the index option Index items immediately is set. The form warns that this can hurt performance on larger sites. In Drush, search-api:index indexes items and search-api:status shows how many are left.
Example
The quickest start is the Database Search Defaults submodule, following its README. Install Search API, then enable Database Search Defaults. It creates a server, an index and a search view for nodes. The search page appears at /search/content, and you can adjust the setup under /admin/config/search/search-api. The README advises uninstalling Database Search Defaults again right after installation for performance reasons; the configuration stays.
Common mistakes
- Assuming results respect access rules. The project page says the module does not enforce access restrictions generically. Use the Content access processor, which adds access checks for nodes and comments, and the Entity status processor, which keeps unpublished entities out of the index.
- Using a plain Views filter for keywords. The Search API documentation recommends the Fulltext search filter for keywords. Pick it in the view instead of an ordinary text filter.
- Letting referenced data go stale. Renaming a taxonomy term does not touch the items that mention it unless the index option Track changes in referenced entities is on. The option can slow down saves on large sites.
- Leaving other search modules running. The Search API documentation advises uninstalling search modules you do not use. Core's Search module, for one, updates the index of its active search pages on every cron run.
For marketing and content teams
What visitors find depends on what the index contains, so tell your developer which content types, fields and languages should be searchable. A new article appears in results only after it is indexed, which can lag behind publishing. If matches in one field, such as the title, should count more, ask for a boost: the documentation defines it as a number that sets how important a field is for fulltext keywords. Review the results page with real queries from your visitors.
Sources
- Drupal.org: Search API project page (checked 2026-10-26)
- Search API documentation: Glossary
- Search API documentation: First steps
- Search API documentation: Server backends and features
- Search API documentation: Common pitfalls
- Search API 8.x-1.42: index form
- Search API 8.x-1.42: Database Search Defaults README
- Search API 8.x-1.42: Database Search README
- Search API 8.x-1.42: Content access processor
- Search API 8.x-1.42: Entity status processor
- Search API 8.x-1.42: Drush commands
- Drupal.org: Search API Solr project page (checked 2026-10-26)