Install Solr site search for Open Y

Open Y leverages Apache Solr for a few features:

Quick Start / Upgrade path

  • Log in as admin.
  • Go to admin/modules and enable the Open Y Search API module.

image

  • Approve the next step for enabling Database Search.

image

  • Go to the Search API configuration page admin/config/search/search-api.
  • Verify that the “OpenY Database Search” server is enabled.
  • Visit “Search content” index.

image

tip: Admins can enable and the Solr search and switch the index between servers.

  • Index content by clicking “Index now”.

image

  • Go to the homepage and search for any keyword.

image

  • Verify search results are displayed correctly.

Starting from the Open Y installer

  • Find the Select search service step displayed during the Open Y installation.
  • Choose from one of these options during installation:
    • None
      • Nothing happens if the user chooses this option, search modules are displayed after installation.
    • Open Y Google Custom Search
      • Google Custom Search configuration form is displayed if the user chooses this option.
      • The Open Y Google Search module is enabled after installation and ready to use.
    • Open Y Search API
      • Search API backend options are displayed in this case with the following options:
        • Database
          • The Open Y Search API module is enabled after installation. The database search API server is enabled. The search is ready to use after content indexation.
        • Solr
          • Additional installation step with Solr configuration form is displayed in this case and user can specify all params for Solr connection. The Open Y Search API module is enabled after installation, Solr search API server is enabled. The search is ready to use after content indexing (if the correct Solr settings were used).

Switch from database search backend to Solr backend

Watch a video tutorial on how to switch an existing site from the database backend to a Solr server. This requires a Solr server to be configured in your environment.

  • Edit the “Solr search” server from the Search API configuration admin/config/search/search-api.
  • Add the configuration information for your Solr server. Refer to Drupal’s Search API Solr project for troubleshooting connection information.
  • Save the server and observe that Search API has successfully connected to your server.
  • Edit the “Search content” index and change the “Server” field to the newly configured “Solr Search” index.
  • Visit the “Search content” index and click “Index now” to re-index the content.

Legacy Solr Support

The contrib Search API Solr module supports a broad swath of Solr versions, but occasionally old versions are dropped from support in the main module. If, when enabling Open Y Search API, you encounter errors that your version of Solr is out of date, you may need to enable the [Search API Solr Legacy module]( https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/modules/search_api_solr_legacy/README.md]. As of January 2022, Search API Solr Legacy supports Solr 3.6 through 6.4.

The error message may look something like this:

Notice: Undefined index: 4.x in Drupal\search_api_solr\Controller\SolrConfigSetController->getConfigFiles()