Back to overview

Apache SOLR

Add it on-the-fly to your HumHub by activating it in the Modules menu! ("Administration -> Modules")


Apache SOLR Integration

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:

Installation

Configuration

Add following part into the components section of your configuration file.

'search' => [
    'class' => 'humhub\modules\solr\engine\SolrSearch',
    'host' => 'solr-host-name-here', // e.g. localhost
    'port' => 12345, // e.g. 8983
    'path' => 'solr-path', // e.g. /solr/example1
    'username' => 'optional-user-name',
    'password' => 'optional-password',
],

More information about the individual configuration can be found here: docs.humhub.org

Apache SOLR Configuration

Use the standard managed schema mode (schemaless).

Search core creation example:

cd bin
./solr create -c example1

Tweak default field type:

Edit the file server/solr/example1/conf/solrconfig.xml and change:

<str name="defaultFieldType">strings</str>

to:

<str name="defaultFieldType">string</str>

Restart the SOLR search server:

cd bin
./solr restart

Active the SOLR search

Rebuild your search index and check your Apache SOLR status page.

Tuning

Change following field types:

curl -X POST -H 'Content-type:application/json' --data-binary '{
  "replace-field":{
     "name":"files",
     "type":"text_general",
     "stored":false }
}' http://localhost:8983/solr/example1/schema
curl -X POST -H 'Content-type:application/json' --data-binary '{
  "replace-field":{
     "name":"comments",
     "type":"text_general",
     "stored":false }
}' http://localhost:8983/solr/example1/schema

1.0.0 (November 11, 2019)

  • Enh: Initial release of standalone version
Version:
1.0.0 (released 2 months ago)

Publisher:
HumHub GmbH & Co. KG

Website:
https://github.com/humhub/humhub-modules-solr

Compatibility:
HumHub 1.4 - Latest