You are here

public function BackendSpecificInterface::isAvailable in Search API 8

Returns a boolean with the availability of the backend.

This can implement a specific call to test if the backend is available for reading. For SOLR or elasticsearch this would be a "ping" to the server to test if it's online. If this is a db-backend that is running on a separate server, this can also be a ping. When it's a db-backend that runs in the same database as the drupal installation; just returning TRUE is enough.

Return value

bool The availability of the backend.

2 methods override BackendSpecificInterface::isAvailable()
BackendPluginBase::isAvailable in src/Backend/BackendPluginBase.php
Returns a boolean with the availability of the backend.
Server::isAvailable in src/Entity/Server.php
Returns a boolean with the availability of the backend.

File

src/Backend/BackendSpecificInterface.php, line 46

Class

BackendSpecificInterface
Defines methods common to search servers and backend plugins.

Namespace

Drupal\search_api\Backend

Code

public function isAvailable();