You are here

public function DrupalApacheSolrService::getSolrVersion in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::getSolrVersion()
  2. 7 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::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 250

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;
}