Full text search (FTS) allows a sophisticated approach to text search in Totara, particularly within the catalogue.
Instead of plain substring search, it leverages FTS features provided by database systems to improve search results in the following ways:
Order by relevance
Search of phrases even when words are ordered differently
Language-aware search
Word forms and time-aware search (be/was/is or run/ran)
Diacritics support
Morphological search
Partial search from beginning of the words (e.g. 'Edu*' will return items with word 'Education')
All these advantages can significantly improve the user search experience, helping to find the most relevant content for them.
Totara does not perform full text search by itself, but leverages capabilities provided by database engines. This means that the existence and performance of any of these features depends solely on the database engine used, and how it is configured.
Database FTS greatly reduces the need in infrastructure overhead requirements for third party FTS solutions like Elasticsearch. However, in some cases it also requires additional configuration of used databases to enable certain search features. Otherwise, only basic FTS features will be available. Currently only a single language per site is supported within full text search.
Catalogue data
The catalogue search index stores data in three relevance tiers: high, medium, and low. Matches in the high tier are prioritised over matches in the medium tier, followed by the low tier. These tiers determine the relevance score for each catalogue item and influence the order in which results are returned.
The table below summarises which component data is stored in each tier.
Component | High | Medium | Low |
|---|---|---|---|
Article | Name | Tags | Content |
Certification | Full name, Short name | Summary, tags, search metadata | idnumber, courses full name, courses short name, courses category hierarchy |
Course | Full name, Short name | Summary, tags, search metadata | idnumber, section titles, category hierarchy |
Playlist | Name | Tags, Summary |
|
Program | Full name, Short name | Summary, tags, search metadata | idnumber, courses full name, courses short name, courses category hierarchy |
Workspace | Name | Tags, Summary | - |
Language support
Unlike other existing data definition language (DDL) features, full text search is language aware. The language is specified during the creation of the index, and is used by your database in the production of the index. It is used for the likes of breaking words, ignoring noise words (a, it, and etc.), and for other linguistic features provided by the full text search index of your database.
Totara full text search supports one language only. It should be specified in your config.php file, and we recommend setting it to a language compatible with your $CFG→lang. The actual value is database independent.
To set your language add the following to your config.php:
$CFG->dboptions['ftslanguage'] = 'your language';The actual value is database dependent.
Wildcard search
With FTS, it is possible to search for partial words. To do this, just put an asterisk (*) after the beginning of the word in the search input. For example, searching for 'edu*' will return items that contain the word 'education' in them).
All supported databases work with this feature and no additional configuration is required. If a particular database requires another wildcard character then Totara will handle that for the user.
Accent insensitive search
Generally, having proper vocabularies in database word stemming will provide both accented and unaccented versions of word stem. However, if your database configuration doesn't allow that then accents can be disabled globally by adjusting configuration variable:
$CFG→dboptions['ftsaccentsensitivity'] = false;
And running FTS re-populating tables:
php admin/cli/fts_rebuild_indexes.phpDatabase-specific information
To get the most out of full text search, database administrators need to follow their database documentation to enable and configure relevant database plugins, install dictionaries, and adjust various database settings.
In addition, we have collected and provided some tips and tricks for the following databases. This is not a replacement for official database documentation, but rather a selection of examples showing how various settings can affect search results.
Next steps
Join the Totara Community for more resources to help you get the most out of Totara.
© Copyright 2025 Totara Learning Solutions. All rights reserved. Some content originally obtained via GPLv3 license and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions.