You are here

function search_api_index_delete in Search API 7

Deletes a search index.

Parameters

$id: The ID or machine name of the index to delete.

Return value

bool TRUE on success, FALSE on failure.

File

./search_api.module, line 3049
Provides a flexible framework for implementing search services.

Code

function search_api_index_delete($id) {
  $index = search_api_index_load($id);
  if (!$index) {
    return FALSE;
  }
  $index
    ->delete();
  return TRUE;
}