public function SolrConnectorPluginBase::alterConfigFiles in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::alterConfigFiles()
- 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::alterConfigFiles()
Alter the newly assembled Solr configuration files.
Parameters
string[] $files: Array of config files keyed by file names.
string $lucene_match_version: Lucene (Solr) minor version string.
string $server_id: Optional Search API server id. Will be set in most cases but might be empty when the config generation is triggered via UI or drush.
Overrides SolrConnectorInterface::alterConfigFiles
3 calls to SolrConnectorPluginBase::alterConfigFiles()
- Solr36Connector::alterConfigFiles in modules/
search_api_solr_legacy/ src/ Plugin/ SolrConnector/ Solr36Connector.php - Alter the newly assembled Solr configuration files.
- StandardSolrCloudConnector::alterConfigFiles in src/
Plugin/ SolrConnector/ StandardSolrCloudConnector.php - Alter the newly assembled Solr configuration files.
- StandardSolrConnector::alterConfigFiles in src/
Plugin/ SolrConnector/ StandardSolrConnector.php - Alter the newly assembled Solr configuration files.
2 methods override SolrConnectorPluginBase::alterConfigFiles()
- Solr36Connector::alterConfigFiles in modules/
search_api_solr_legacy/ src/ Plugin/ SolrConnector/ Solr36Connector.php - Alter the newly assembled Solr configuration files.
- StandardSolrConnector::alterConfigFiles in src/
Plugin/ SolrConnector/ StandardSolrConnector.php - Alter the newly assembled Solr configuration files.
File
- src/
SolrConnector/ SolrConnectorPluginBase.php, line 1236
Class
- SolrConnectorPluginBase
- Defines a base class for Solr connector plugins.
Namespace
Drupal\search_api_solr\SolrConnectorCode
public function alterConfigFiles(array &$files, string $lucene_match_version, string $server_id = '') {
if (!empty($this->configuration['jmx'])) {
$files['solrconfig_extra.xml'] .= "<jmx />\n";
}
if (!empty($this->configuration['jts'])) {
$jts_arguments = 'spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory" autoIndex="true" validationRule="repairBuffer0"';
$files['schema.xml'] = preg_replace("#\\sclass\\s*=\\s*\"solr\\.SpatialRecursivePrefixTreeFieldType\"#ms", "\\0\n " . $jts_arguments, $files['schema.xml']);
}
}