You are here

function search_api_index_edit in Search API 7

Changes an index' settings.

Parameters

int|string $id: The edited index' ID or machine name.

array $fields: The new field values to set.

Return value

int|false 1 if fields were changed, 0 if the fields already had the desired values. FALSE on failure.

File

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

Code

function search_api_index_edit($id, array $fields) {
  $index = search_api_index_load($id, TRUE);
  $ret = $index
    ->update($fields);
  return $ret ? 1 : $ret;
}