Integrates Apache Solr software into the HumHub search subsystem.
Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.
More information about Apache SOLR can be found here:
This guide covers only the basic installation and configuration steps of Apache Solr. More advanced configuration will be required, such as firewall security settings or individual performance tuning.
Note: This documentation was tested at last with Apache Solr 8.4.1 and should be compatible with all Apache Solr versions 8.0+.
Install Apache Solr as described in the Solr manual.
As quick start: Download Apache Solr and extract it to any folder (e.g. /opt/solr). After successfully extracting the file, Solr can be installed as a service in a Linux system by calling solr/bin/install_solr_service.sh.
Start SOLR. e.g.
cd /opt/solr
./bin/solr start
Add a new core for HumHub. e.g.
cd /opt/solr
./bin/solr create -c humhubcore
Configure the core. Make sure that this step happens before the first use of the core.
Stop the Solr Service:
cd /opt/solr
./bin/solr stop
Copy configuration provided by HumHub SOLR module.
cd /opt/solr/server/solr/humhubcore/conf
cp /path-to-humhub/protected/modules/solr/docs/schema.xml .
cp /path-to-humhub/protected/modules/solr/docs/solrconfig.xml .
rm managed-schema
Restart Apache Solr after this change!
cd /opt/solr
./bin/solr restart
Make sure the Solr Search module is installed and enabled.
Add following part into the components
section of your configuration file protected/config/common.php
.
<?php
return [
// ...
'components' => [
// ...
'search' => [
'class' => 'humhub\modules\solr\engine\SolrSearch',
'host' => 'localhost',
'port' => 8983,
'path' => '/solr/humhubcore'
],
// ...
]
// ...
];
More information about the individual configurations can be found here: docs.humhub.org
Rebuild the search index.
cd /path-to-humhub-here/protected
php yii search/rebuild