function panopoly_search_default_search_api_index_alter in Panopoly 7
Implements hook_default_search_api_index_alter().
File
- modules/
panopoly/ panopoly_search/ panopoly_search.module, line 75
Code
function panopoly_search_default_search_api_index_alter(&$items) {
if (isset($items['node_index'])) {
// Hack to allow 'enabled' to be changed without the Feature becoming
// overridden (will still be overridden in the Search API admin).
if ($solr_index = search_api_index_load('node_index')) {
$items['node_index']->server = $solr_index->server;
$items['node_index']->enabled = $solr_index->enabled;
}
}
}