public function Apache_Solr_Service::setHost in Apache Solr Search 5
Set the host used. If empty will fallback to constants
Parameters
string $host:
1 call to Apache_Solr_Service::setHost()
- Apache_Solr_Service::__construct in SolrPhpClient/
Apache/ Solr/ Service.php - Constructor. All parameters are optional and will take on default values if not specified.
File
- SolrPhpClient/
Apache/ Solr/ Service.php, line 335
Class
- Apache_Solr_Service
- Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.
Code
public function setHost($host) {
//Use the provided host or use the default
if (empty($host)) {
throw new Exception('Host parameter is empty');
}
else {
$this->_host = $host;
}
if ($this->_urlsInited) {
$this
->_initUrls();
}
}