public function DrupalApacheSolrService::getSolrVersion in Apache Solr Search 7
Same name and namespace in other branches
- 8 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::getSolrVersion()
- 6.3 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::getSolrVersion()
Get the current solr version. This could be 1, 3 or 4
Return value
int 1, 3 or 4. Does not give a more details version, for that you need to get the system info.
Overrides DrupalApacheSolrServiceInterface::getSolrVersion
4 calls to DrupalApacheSolrService::getSolrVersion()
- DrupalApacheSolrService::commit in ./
Drupal_Apache_Solr_Service.php - Send a commit command. Will be synchronous unless both wait parameters are set to false.
- DrupalApacheSolrService::getStatsSummary in ./
Drupal_Apache_Solr_Service.php - Get summary information about the Solr Core.
- DrupalApacheSolrService::optimize in ./
Drupal_Apache_Solr_Service.php - Send an optimize command. Will be synchronous unless both wait parameters are set to false.
- DrupalApacheSolrService::setStats in ./
Drupal_Apache_Solr_Service.php - Sets $this->stats with the information about the Solr Core form
File
- ./
Drupal_Apache_Solr_Service.php, line 258
Class
- DrupalApacheSolrService
- 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 getSolrVersion() {
$system_info = $this
->getSystemInfo();
// Get our solr version number
if (isset($system_info->lucene->{'solr-spec-version'})) {
return $system_info->lucene->{'solr-spec-version'}[0];
}
return 0;
}