function search_api_index_load_multiple in Search API 7
Load multiple indexes at once, determined by IDs or machine names, or by other conditions.
Parameters
array|false $ids: An array of index IDs or machine names, or FALSE to load all indexes.
array $conditions: An array of conditions on the {search_api_index} table in the form 'field' => $value.
bool $reset: Whether to reset the internal entity_load cache.
Return value
SearchApiIndex[] An array of index objects keyed by machine name.
See also
26 calls to search_api_index_load_multiple()
- drush_search_api_list in ./
search_api.drush.inc - List all search indexes.
- SearchApiAbstractService::preDelete in includes/
service.inc - Implements SearchApiServiceInterface::__construct().
- SearchApiCombinedEntityDataSourceController::getCallingIndex in includes/
datasource_multiple.inc - Retrieves the index for which the current method was called.
- search_api_admin_overview in ./
search_api.admin.inc - Page callback that shows an overview of defined servers and indexes.
- search_api_admin_server_view in ./
search_api.admin.inc - Page callback: Displays information about a server.
File
- ./
search_api.module, line 2839 - Provides a flexible framework for implementing search services.
Code
function search_api_index_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
// This line is a workaround for a weird PDO bug in PHP 5.2.
// See http://drupal.org/node/889286.
new SearchApiIndex();
$indexes = entity_load('search_api_index', $ids, $conditions, $reset);
return entity_key_array_by_property($indexes, 'machine_name');
}