You are here

function search_api_index_insert in Search API 7

Inserts a new search index into the database.

Parameters

array $values: An array containing the values to be inserted.

Return value

The newly inserted index' id, or FALSE on error.

2 calls to search_api_index_insert()
search_api_admin_add_index_submit in ./search_api.admin.inc
Form submission handler for search_api_admin_add_index().
search_api_install in ./search_api.install
Implements hook_install().

File

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

Code

function search_api_index_insert(array $values) {
  $index = entity_create('search_api_index', $values);
  $index->is_new = TRUE;
  $index
    ->save();
  return $index->id;
}