Created
June 10, 2014 18:35
-
-
Save purplexa/92772edb36315c3cee7e to your computer and use it in GitHub Desktop.
Variable-based solr settings
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 | |
| /** | |
| * Implements hook_default_search_api_server_alter(). | |
| * | |
| * Override the Solr server options to load from a variable. | |
| */ | |
| function example_default_search_api_server_alter(array &$defaults) { | |
| $defaults['drupal_solr']->options['host'] = variable_get('drupal_solr_host', 'localhost'); | |
| $defaults['drupal_solr']->options['port'] = variable_get('drupal_solr_port', '8983'); | |
| $defaults['drupal_solr']->options['path'] = variable_get('drupal_solr_path', '/solr/drupal'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment