Totara Learn Open Discussions

Catalogue search with only 2 characters

 
LyonsSam
Catalogue search with only 2 characters
LyonsSam 发表于 2020年11月8日 Sunday 21:33
 

We have a number of courses where students search for them using only two characters  

e.g. Introduction to IT, Beginning PE

Students are searching for "IT" and "PE"

The catalogue search requires 3 characters for a search to occur but (rather unhelpfully) will return the following for a 2 character search "No available learning matches your search". This search behaviour results in students emailing us to say they can't find the course.

Is there a admin setting I can change so that it will search on 2 characters?

WoodTom
Re: Catalogue search with only 2 characters
WoodTom 发表于 2020年11月9日 Monday 14:10
小组 Totara
Hi Sam,

Am I correct in understanding you are using the Grid Catalogue?

Assuming this is correct, then the reason for the difference in behaviour is related to Full Text Search (FTS) and the ways different databases handle search.

In this case I suspect that this maybe related to a MySQL config setting (or MariaDB).

The minimum search string length in MySQL can be changed via a database config setting.

You may need to speak to system administrator or the person/team managing your site to assist with this but there is a configuration that you can set in your database config file (my.cnf)

[mysqld] innodb_ft_min_token_size=3 ft_min_word_len=3

I'd suggest changing this to the desired value (eg. 1 or 2) and see if that helps.

There is more information about this here: https://help.totaralearning.com/display/TL12/Full+Text+Search+in+MySQL

For MariaDB see: https://help.totaralearning.com/display/TL12/Full+Text+Search+in+MariaDB#FullTextSearchinMariaDB-Minimumsearchtermlength

Let me know if this solves it for you. If you're not using MySQL/MariaDB then please let me know.

Cheers

Woody
LyonsSam
Re: Catalogue search with only 2 characters
LyonsSam 发表于 2020年11月9日 Monday 14:54
 
Thanks Tom :)


I will pass this information on to my system admin.