Reduce search word length to two digits

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Reduce search word length to two digits

Post by boettner » 21 Sep 2020, 14:18

Hi,

how can I reduce the search word length to two digits) I found the parameter in autocomplete but there must be another one for the actual query since I don´t get results yet.

Thanks
Robert.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Reduce search word length to two digits

Post by aimeos » 21 Sep 2020, 14:26

You have to change the settings in the mysql.cnf file of you DB server to get this working:
https://aimeos.org/docs/Administrators/ ... mum_length
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Reduce search word length to two digits

Post by boettner » 21 Sep 2020, 14:28

Great thanks for this ultra-fast reply!

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Reduce search word length to two digits

Post by boettner » 22 Sep 2020, 14:45

Hi again,

ft_min_word_len is set correctly:

Code: Select all

mysql> show VARIABLES LIKE '%ft_min_w%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| ft_min_word_len | 2     |
+-----------------+-------+
1 row in set (0.00 sec)
I rebuilt the mshop_index_text table by deleting it and setting it up by the update job after not having enough rights do it in another way. Afterwards I rebuilt the index by running the product index job.

An autocomplete search is issued after two entered characters but no result gets returned in frontend.

If I check it via DB I get results:

Code: Select all

SELECT * FROM `mshop_index_text` WHERE `content` LIKE '%F9%'
Do you have any suggestion how to debug this further?

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Reduce search word length to two digits

Post by boettner » 22 Sep 2020, 14:47

Forgot:

Code: Select all

SELECT * FROM mshop_index_text
        WHERE MATCH (content)
        AGAINST ('F9');
        
This returned no results.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Reduce search word length to two digits

Post by aimeos » 23 Sep 2020, 14:35

MySQL full text search is very different from a LIKE query and it may handle words with numbers differently.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Reduce search word length to two digits

Post by boettner » 23 Sep 2020, 14:39

Thanks for your answer. I know:
boettner wrote: 22 Sep 2020, 14:47 Forgot:

Code: Select all

SELECT * FROM mshop_index_text
        WHERE MATCH (content)
        AGAINST ('F9');
        
This returned no results.
Also searching e.g. for "TW" returns no results. Do have by chance an idea how to track that down?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Reduce search word length to two digits

Post by aimeos » 23 Sep 2020, 14:55

If those two letter words are too often used in the text, they will be ignored.
Another problem could be that they may be in the MySQL stopwords list.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply