Jump to content

Adjusting search to allow 2 character search terms


Recommended Posts

It's a limitation of mySQL.

It's a global change that needs to be made to your mySQL server.  Specifically you need to edit (or create) the  ft_min_word_len variable with the minimum character limit and then restart mySQL.

[mysqld]
ft_min_word_len=N

This can have a BIIIIIIIG impact on mySQL's performance and could cause stability/reliability issues.  Changing the minimum word length will cause many queries to have to do much more work and cause much higher system resource usage.  So you should understand the risks and challenges associated with the request.   

Also it goes without saying this is not an IPS issue and something that support can assist with.  🙂 

Link to comment
Share on other sites

Thank you for your response, Randy. I understand that it's not something support can help with directly. I'm just hoping to be pointed in the right direction.

The problem is that I've already changed ft_min_word_len to 2 in my.cnf. I then restarted MySQL, rebuilt the search index, and cleared the system cache. Still no two character search.

I saw in another post that, if you have database tables running on InnoDB, then there's additional configuration that needs to be done. Do you know if that's the case? Here's the post I'm referring to.

 

Link to comment
Share on other sites

34 minutes ago, Randy Calvert said:

It was related to a bug in 4.1.x which is almost 10 years old. 😉  Read further down in that thread and you'll see after making the change to the my.cnf and rebuilding the IPB search index, it worked.  

Actually, the post did end up putting me on the right track. I followed its suggestion and added an additional line to my.cnf for innoDB:

innodb_ft_min_token_size=2

And that, in additional to ft_min_word_len=2, made two character search terms work.

Appreciate your time, Randy -- hopefully this helps out anyone else trying to make this work.

Link to comment
Share on other sites

19 hours ago, zenzoidman said:

Actually, the post did end up putting me on the right track. I followed its suggestion and added an additional line to my.cnf for innoDB:

innodb_ft_min_token_size=2

And that, in additional to ft_min_word_len=2, made two character search terms work.

Appreciate your time, Randy -- hopefully this helps out anyone else trying to make this work.

One is for innodb tables, so its likely just the line you added that would help you if you have all innodb tables (you should have)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...