Last active
March 26, 2020 01:22
-
-
Save dorian-e3/1fe109ffbdd1667928d3a941652e2fc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//---------------// | |
// Solr Settings // | |
//---------------// | |
// Solr settings for Acquia envs | |
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) { | |
// Assign index to Acquia server | |
$config['search_api.index.acquia_search_index']['server'] = 'acquia_search_server'; | |
// Enable Acquia server | |
$config['search_api.server.acquia_search_server']['status'] = TRUE; | |
// Not read-only on prod | |
if( $_ENV['AH_SITE_ENVIRONMENT'] == 'prod') { | |
$config['search_api.index.acquia_search_index']['read_only'] = FALSE; | |
} | |
// Read-only on non-prod | |
else { | |
$config['search_api.index.acquia_search_index']['read_only'] = TRUE; | |
} | |
} | |
// Solr settings for Local envs | |
else { | |
// Assign index to Local | |
$config['search_api.index.acquia_search_index']['server'] = 'solr_server'; | |
// Disable Acquia server to make it clear in admin what's happening | |
$config['search_api.server.acquia_search_server']['status'] = FALSE; | |
// Set read only to false | |
$config['search_api.index.acquia_search_index']['read_only'] = FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment