- A Solr server is up and running with a dummy-core .
- You have to use composer to manage the dependencies of the module Solr Search, so if you haven't a installed version >=2, please follow the instructions for your OS on the composer site.
Drupal-Solr supports of functions and processors. For further reference visit the howto pages.
Solr Search Api
Open a terminal, change to your root-dir and install Solr Search module with
composer require 'drupal/search_api_solr:^4.2'
Activate the module at Manage Extend by checking Search API, Search API Solr and Search API Solr Admin and click Install.
Since Search API assumes, that it operates on SQL tables, we have to alter some parts of the ContentEntity class at root-dir \modules\contrib\search_api\Plugin\search_api\datasource\ContentEntity.php.
You can just replace the content with this code (please compare Search API versions).
Add Solr Server
Go to Manage Configuration Search API (Search and metadata). Click + Add server. Enter a name for your solr-server , check Standard as Solr Connector (in Configure Solr backend section). Enter the name of your dummy-core in the Solr core field (in section Configure standard Solr connector). Open the Advanced Section with a click and check Retrieve result data from Solr and Retrieve highlighted snippets, then click Save. You switch automatically to the View tab of your new created WissKI Solr API configuration.
Download Solr Config
Click + Get config.zip and download it to your preferred download-directory , switch to the download directory and unzip the zip file.
unzip solr*.zip -d config
Right click on the zip file, click Extract All and rename the folder to config.
Create WissKI Solr core
Open a terminal in your
(Only for Linux/ MacOS users: switch to solr user by typing
su solr) and create a
(the path to solr binaries in the
may vary), with your specific configuration files, i. e. by
/opt/solr/bin/solr create_core -c wisski_solr -d config -n wisski_solr
Switch to WissKI Core
At Manage Configuration Search API (Search and metadata section), click on Edit (Operations column), alter the Solr core field (Configure standard Solr Connector section) to your wisski-solr-core and click Save.
At Manage Configuration Search API (Search and metadata section), click on your solr-server . As Server Connection, you should see The Solr server could be reached.
Add search index
At Manage Configuration Search API (Search and metadata section), click on + Add index. Enter a name for your solr-index and check Wisski Entity from Datasources. Check the radio button Only those selected and select the bundles, which should be indexed. As the Server, select your solr-server from the list.
You may want to uncheck Index items immediately at Index options to keep Solr from constantly triggering new indexing operations. You have to start the indexing manually then!
Add Highlight processor
At Manage Configuration Search API (Search and metadata section), unfold the Operations for your solr-index by clicking on the caret and select Processors. Check Highlight in the Enabled section. In the section Processor settings instantly arise a tab called Highlight, check Highlight partial matches and uncheck Create excerpt, delete the content of Highlighting prefix and Highlighting suffix field.