public function BackendSpecificInterface::addIndex in Search API 8
Adds a new index to this server.
If the index was already added to the server, the object should treat this as if removeIndex() and then addIndex() were called.
Parameters
\Drupal\search_api\IndexInterface $index: The index to add.
Throws
\Drupal\search_api\SearchApiException Thrown if an error occurred while adding the index.
2 methods override BackendSpecificInterface::addIndex()
- BackendPluginBase::addIndex in src/
Backend/ BackendPluginBase.php - Adds a new index to this server.
- Server::addIndex in src/
Entity/ Server.php - Adds a new index to this server.
File
- src/
Backend/ BackendSpecificInterface.php, line 124
Class
- BackendSpecificInterface
- Defines methods common to search servers and backend plugins.
Namespace
Drupal\search_api\BackendCode
public function addIndex(IndexInterface $index);