Search
The built in search system is used for:
- Content
- People
- Spaces
- Marketplace
- Third-party resources ("Advanced Search" - HumHub Professional Edition module)
Content Search - Index Rebuilding
If you want to rebuild the search index (e.g. after updating/restore backup), you have two methods:
Browser
Log in to your HumHub with an administrator account and go to the following section: Administration -> Information -> Database.
On this page click on the button "Rebuild search index". The process can take several minutes.
Console
To start the rebuild job, you need to run following command:
- Docker
- Web Server
docker compose exec humhub /app/yii content-search/rebuild
cd /path/to/humhub/protected
php yii content-search/rebuild
File Content Indexing
In order to allow also indexing of file contents (e.g. PDF, Word or PowerPoint document) you can specify file parsers in your configuration.
We recommend Apache Tika as parser software which supports thousand of different file types.
Example configuration:
return [
// ...
'modules' => [
// ...
'file' => [
'converterOptions' => [
'humhub\modules\file\converter\TextConverter' => [
'converter' => [
[
'cmd' => '/usr/bin/pdftotext -q -enc UTF-8 {fileName} {outputFileName}',
'only' => ['pdf']
],
[
'cmd' => '/usr/bin/java -jar /srv/www/var/lib/tika-app-1.18.jar -maxFileSizeBytes=67108864 --text {fileName} 2>/dev/null',
'except' => ['image/', 'application/x-tar', 'application/zip', ]
],
]
]
]
],
],
];
Search Syntax Reference Cheat Sheet
This cheat sheet lists search operators and explains what they do. It helps you build search queries so you can filter, combine, or adjust your searches with more control.
-word Exclusion Operator
Function: Excludes any result that contains the given word.
Example:
report -draft
Explanation:
Find results that contain report but do not include draft.
+word Required/AND Operator
Function: Forces the word to be present in the result.
Example:
+budget +2024
Explanation:
Find results that contain both budget and 2024.