Server backends and features

Last updated on
8 December 2022

This page explains the Search API concept of features and lists all known backends that are currently available.

Features

Backends in the Search API have to provide clearly-defined functionality to make indexing and searching work as expected. However, especially when connecting external search services to the Search API, they are usually capable of more than just the base functionality the Search API requires. Features are a way of describing these additional capabilities so other modules can make use of them, even while still remaining backend-independent (although no longer server-independent, as the server an index lies on now matters).

A feature is a clearly-defined piece of functionality a backend can optionally implement and provide to other modules. For instance, it could involve recognizing an additional option on the search query object and acting accordingly, or implementing an additional method in the backend plugin, etc. Features are defined by the third-party modules using them, which should include a detailed description of the contract backend plugins implementing the feature have to fulfill.

From a site builder's stand point, a backend's features could mean that things like facetting, autocomplete or location search are or aren't available.

These "features" aren't related to the popular "Features" module in any way.

Currently known features

The following is a list with descriptions of all currently known features (some of them not yet ported from Drupal 7, though).

search_api_autocomplete
Defined/used by: Search API autocomplete
Description: Allows autocompletion of fulltext keywords in search forms (along with result count estimates).
search_api_facets
Defined/used by: Facets
Description: Allows facetted searching, with facets showing possible filter options.
search_api_facets_operator_or
Defined/used by: Facets
Description: Along with the search_api_facets feature, allows the creation of „OR“ facets, i.e., facets which yield more results when more than one facet term is activated.
search_api_grouping
Defined/used by: Search API Grouping
Description: Allows grouping of results based on the value of one or more fields.
search_api_mlt
Defined/used by: Search API (resp. its Views integration)
Description: Allows „More Like This“ queries, in which an item ID is given and the search should return items that are similar (according to the indexed data, in some way) to the specified item.
search_api_random_sort
Defined/used by: Search API (resp. its Views integration)
Description: Allows to randomly sort the results returned by a search. With a server supporting this, you can use the "Global: Random" to sort the View's results randomly. Every time the query is run a different sorting will be provided.
search_api_spellcheck
Defined/used by: Search API Spellcheck
Description: Allows spellchecking the keywords used in a search, by returning similar words that would yield more results.

Custom data types

Like features, contrib modules can also define new data types, which not all backends have to support. Custom data type support works much the same way as feature support. If a field is configured to be indexed with a data type that the current server doesn't support, a suitable fallback data type is used to avoid errors, but the functionality will usually not be the same.

Currently known custom data types are:

Backends

As previously explained, a backend is a concrete method how data is indexed and searched. The following backends are currently available (though not all have been ported to Drupal 8):

  1. Database Search (contained directly in the “Search API” project)
  2. Search API Solr (Documentation)
  3. Elasticsearch Connector
  4. Search API OpenSearch
  5. Algolia
  6. Xunsearch
  7. Coveo
  8. Search API MeiliSearch
  9. Search API Sajari (no searching, no optional features supported)

The following table shows the current state of which features are supported by which service class.

Feature DB Solr ES OS Algolia Xun Coveo Meili
search_api_autocomplete Yes Yes Yes No Yes Yes Yes Yes
search_api_facets Yes Yes Yes Yes Yes Yes Yes Yes
search_api_facets_operator_or Yes Yes Yes Yes Yes No No Yes
search_api_grouping No Yes No No No No No No
search_api_mlt No Yes Yes Yes No No No No
search_api_random_sort No Yes No No No No No No
search_api_spellcheck No Yes No No No No No Yes
Data type DB Solr ES OS Algolia Xun Coveo Meili
location No Yes Yes No No No No No
geohash No Yes No No No No No No

Yes = Service class supports this feature or data type
No = Service class doesn't support this feature or data type

Help improve this page

Page status: No known problems

You can: