You are here

public function SearchApiServiceInterface::removeIndex in Search API 7

Removes an index from this server.

This might mean that the index has been deleted, or reassigned to a different server. If you need to distinguish between these cases, inspect $index->server.

If the index wasn't added to the server, the method call should be ignored.

Implementations of this method should also check whether $index->read_only is set, and don't delete any indexed data if it is.

Parameters

$index: Either an object representing the index to remove, or its machine name (if the index was completely deleted).

Throws

SearchApiException If an error occurred while removing the index.

2 methods override SearchApiServiceInterface::removeIndex()
SearchApiAbstractService::removeIndex in includes/service.inc
Implements SearchApiServiceInterface::__construct().
SearchApiDummyService::removeIndex in tests/search_api_test_2.module
Removes an index from this server.

File

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

Class

SearchApiServiceInterface
Interface defining the methods search services have to implement.

Code

public function removeIndex($index);