public function BackendPluginBase::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.
Overrides BackendSpecificInterface::addIndex
2 methods override BackendPluginBase::addIndex()
- Database::addIndex in modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php - Adds a new index to this server.
- TestBackend::addIndex in tests/
search_api_test/ src/ Plugin/ search_api/ backend/ TestBackend.php - Adds a new index to this server.
File
- src/
Backend/ BackendPluginBase.php, line 245
Class
- BackendPluginBase
- Defines a base class for backend plugins.
Namespace
Drupal\search_api\BackendCode
public function addIndex(IndexInterface $index) {
}