protected function SearchApiSolrService::getIndexId in Search API Solr 7
Prefixes an index ID as configured.
The resulting ID will be a concatenation of the following strings:
- If set, the "search_api_solr_index_prefix" variable.
- If set, the index-specific "search_api_solr_index_prefix_INDEX" variable.
- The index's machine name.
Parameters
string $machine_name: The index's machine name.
Return value
string The prefixed machine name.
6 calls to SearchApiSolrService::getIndexId()
- SearchApiSolrService::deleteItems in includes/
service.inc - Implements SearchApiServiceInterface::deleteItems().
- SearchApiSolrService::extractResults in includes/
service.inc - Extract results from a Solr response.
- SearchApiSolrService::getAutocompleteSuggestions in includes/
service.inc - SearchApiSolrService::indexItems in includes/
service.inc - Indexes the specified items.
- SearchApiSolrService::search in includes/
service.inc - Executes a search on the server represented by this object.
File
- includes/
service.inc, line 2731
Class
- SearchApiSolrService
- Search service class using Solr server.
Code
protected function getIndexId($machine_name) {
// Prepend per-index prefix.
$id = variable_get('search_api_solr_index_prefix_' . $machine_name, '') . $machine_name;
// Prepend environment prefix.
$id = variable_get('search_api_solr_index_prefix', '') . $id;
return $id;
}