You are here

function search_api_index_clear in Search API 7

Clears a search index and schedules all of its items for re-indexing.

Parameters

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

Return value

bool TRUE on success, FALSE on failure.

File

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

Code

function search_api_index_clear($id) {
  $index = search_api_index_load($id);
  return $index
    ->clear();
}