You are here

public function SearchApiServiceInterface::deleteItems in Search API 7

Deletes indexed items from this server.

Might be either used to delete some items (given by their ids) from a specified index, or all items from that index, or all items from all indexes on this server.

Parameters

$ids: Either an array containing the ids of the items that should be deleted, or 'all' if all items should be deleted. Other formats might be recognized by implementing classes, but these are not standardized.

SearchApiIndex $index: The index from which items should be deleted, or NULL if all indexes on this server should be cleared (then, $ids has to be 'all').

Throws

SearchApiException If an error occurred while trying to delete the items.

1 call to SearchApiServiceInterface::deleteItems()
SearchApiAbstractService::removeIndex in includes/service.inc
Implements SearchApiServiceInterface::__construct().
2 methods override SearchApiServiceInterface::deleteItems()
SearchApiDummyService::deleteItems in tests/search_api_test_2.module
Deletes indexed items from this server.
SearchApiTestService::deleteItems in tests/search_api_test.module
Deletes indexed items from this server.

File

includes/service.inc, line 240
Contains SearchApiServiceInterface and SearchApiAbstractService.

Class

SearchApiServiceInterface
Interface defining the methods search services have to implement.

Code

public function deleteItems($ids = 'all', SearchApiIndex $index = NULL);