public function BackendSpecificInterface::deleteAllIndexItems in Search API 8
Deletes all the items from the index.
Parameters
\Drupal\search_api\IndexInterface $index: The index for which items should be deleted.
string|null $datasource_id: (optional) If given, only delete items from the datasource with the given ID.
Throws
\Drupal\search_api\SearchApiException Thrown if an error occurred while trying to delete indexed items.
1 call to BackendSpecificInterface::deleteAllIndexItems()
- BackendPluginBase::removeIndex in src/
Backend/ BackendPluginBase.php - Removes an index from this server.
4 methods override BackendSpecificInterface::deleteAllIndexItems()
- Database::deleteAllIndexItems in modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php - Deletes all the items from the index.
- NoUi::deleteAllIndexItems in tests/
search_api_test_no_ui/ src/ Plugin/ search_api/ backend/ NoUi.php - Deletes all the items from the index.
- Server::deleteAllIndexItems in src/
Entity/ Server.php - Deletes all the items from the index.
- TestBackend::deleteAllIndexItems in tests/
search_api_test/ src/ Plugin/ search_api/ backend/ TestBackend.php - Deletes all the items from the index.
File
- src/
Backend/ BackendSpecificInterface.php, line 203
Class
- BackendSpecificInterface
- Defines methods common to search servers and backend plugins.
Namespace
Drupal\search_api\BackendCode
public function deleteAllIndexItems(IndexInterface $index, $datasource_id = NULL);