[[PageOutline]] = Apache Solr on abernathy.mayfirst.org = [http://lucene.apache.org/solr/ Apache Solr] is an indexing and searching program that can replace the Drupal core search engine with a much improved system. abernathy.mayfirst.org is a dedicated Apache Solr Server that is available for use by any May First/People Link member. Open a [/newticket ticket] or contact the [wiki:chat support team] if you want to use Apache Solr on your website. === Enable Apache Solr on Drupal === ==== Drupal 7: ApacheSolr module ==== To enable Solr you have to install [https://drupal.org/project/apachesolr Apache Solr Drupal module] which is done best through drush: {{{ drush dl apachesolr drush solr-phpclient }}} ==== Drupal 7 & 8: Search API with Search API Solr ==== [https://drupal.org/project/search_api Search API module] with the [https://drupal.org/project/search_api_solr Search API Solr module] === Configure Apache Solr on Drupal === You will need to arrange a search index on abernathy (see contact details above). When you have access details these will need to be added to the module's configuration. {{{ Server: abernathy.mayfirst.org Connection: https Core: /solr/solr_name_provided_by_admin Basic Auth: Username and Password provided }}} If you are using Drupal 7 the search index ('core') will already be configured. If you are using Drupal 8 you will need to export the configuration files from the server 'files' tab, and pass these back to the solr admin. If you update you field schema on Drupal (change entities, fields, and most importantly enabled languages) you might have to download the 'files' configuration again and get the solr core configuration update. == Administrators == See instructions in ansible abernathy.mayfirst.org host vars. Presently: {{{ # To add users with cores. # # 1. Add server to the firewall rules if it's not already there. # 2. Add core name to solr_cores: with obscured name. # Advice is one core per index. For a lot of uses multiple indexes can # go on the same core, but it could cause issues depending on requirements. # 3. Add a username:pass to solr_auth_users: with password. # 4. Add username: "users" role in solr_auth_users_roles. # # 5. On the server a core will have been created with the 'example' config. # /var/solr/data/core_name/conf # Replace this with the configuration required: # - for Drupal 7 search_api_solr there is a copy of the config in /root # - for Drupal 8 search_api_solr it require the site admin to export the configuration from their site administration interface; this can change if the schema or languages change. After configuring the core there is a tab to download it. # https://git.drupalcode.org/project/search_api_solr/blob/8.x-3.x/INSTALL.md # - for WP? # When a configuration has been replaced reload the core, can be done from admin ui. }}}