Advanced How to allow ‘how’ in SKB searches – i.e. Customising Stop Words Table

If you’ve found a limitation where you can’t search for certain keyword in your Sapientia Knowledge Base search, e.g. ‘how‘, ‘where‘, ‘when‘, this is due to a limitation (or feature depending on your perspective) of how MySQL works called Stop Words. Internally, Sapientia Knowledge Base uses something called a FULLTEXT search to help your visitors find content.

The steps here are technical and will need the help of your host or someone technical to make changes to your hosting.

The best and most reliable way to fix this is to do the following:

1) You’ll need a server where you can edit the server mysql ini files (my.ini). This means your hosting needs to be a platform where you can edit a my.ini file. Typically this will be hosting that’s not shared, but do check with your host provider. They might need to do this for you.

2) You’ll need to create a custom stopwords table within your MySQL database for your website. However, the changes will be global for all sites using the same database on that server.

    1. e.g.  CREATE TABLE my_custom_stopwords(value VARCHAR(30)) ENGINE = INNODB;
      where my_custom_stopwords is the name of your new stopwords table.
    2. Then you’ll need to define this in your my.ini configuration file innodb_ft_server_stopword_table = "your_website_db/my_custom_stopwords"; and restart MySQL (or the config file needs to be loaded). Your host can advise on this. your_website_db is the name of your main website database.
    3. The new stopwords table will be empty, but you can add new words if you wish using: INSERT INTO my_custom_stopwords(value) VALUES ('myword');

3) You’ll then need to re-index the content for Sapientia Knowledge Base within the admin area. (The link for this is at the bottom of the “Search Logs” page.


4. Then when you do a search, you’ll find you can use words such as ‘how‘, ‘where‘, ‘when’.