To answer your question faster, you can search our knowledgebase articles before submitting a ticket.
Knowledgebase
Why I can't search for locations that contains words with less than 4 letters (San, St, etc)?
Posted by Ashton Smith on 20 May 2018 03:38 AM

NOTE: The instruction provided below is technical, and if you are not a developer or a technical person, then please consult with your hosting provider.

This issue happens because of the "ft_min_word_len" variable in your server's MySQL Configurations.
It's set to default value of 4, which ignores any word shorter than 4 characters.

You need to change this value to 2 so all your searches that contain values less than 4 letters work properly (like San Juan, Los Angeles, etc).
(Set it to a lesser value like 1 is not recommended, Because it may cause performance issues)

To do so (Root access to the server is required):

1- Edit your MySQL configuration at /etc/my.cnf and add the following line at the end of the file:
ft_min_word_len=2
(If the variable is already there, just change its value to 2)

Note: If your website is a Bitnami app, MySQL configuration file is on a different path:
/opt/bitnami/mysql/my.cnf

2- Restart MySQL server
on cPanel based servers:
sudo /scripts/restartsrv_mysql

On Bitnami stack:
sudo /opt/bitnami/ctlscript.sh restart mysql

on generic servers (You may need to use mariadb instead of mysql):
sudo service mysql restart

3- Confirm the value has changed with the following SQL command
SHOW VARIABLES LIKE 'ft_min_word_len';

4- Repair WPL properties table to rebuild the indexes:
REPAIR TABLE `wp_wpl_properties`
(If Wordpress's database prefix is different, make changes accordingly)


Comments (0)