You are here

public function SolrConnectorPluginBase::getLuceneMatchVersion in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getLuceneMatchVersion()
  2. 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getLuceneMatchVersion()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getLuceneMatchVersion()

Gets the LuceneMatchVersion string.

Parameters

string $version: An optional Solr version string.

Return value

string The lucene match version in V.V format.

Overrides SolrConnectorInterface::getLuceneMatchVersion

File

src/SolrConnector/SolrConnectorPluginBase.php, line 420

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function getLuceneMatchVersion($version = '') {
  [
    $major,
    $minor,
  ] = explode('.', $version ?: $this
    ->getSolrVersion());
  return $major . '.' . $minor;
}