This section explains some available plugin performance options that can help when faced with any issues related to plugin search speed and index table size.
If you have any compliance to the plugin performance you can use special Performance options from the plugin settings page to change some default plugin options and change some search behaviors.
There are several groups of performance options available inside.
The first group of options from the Performance settings page is the Search options. It includes Search rule and AJAX timeout options.
Search rule options determine how search will be performed relative to each word inside products fields. You can choose from contains
and begins
values.
Contains
rule means that there will be find all products that have search query at any part of the product words ( beginning, end, middle ). This search rule can be quite slow
and it is recommended to switch to begins
search rule and you struggle with search speed.
Begins
search rule means that there will be find only products that have search query at the beginning of each product words.
Example: In your shop you have products with words catalog, bearcat and aprications. Users search for cat.
- Contains
rule: will display the products with catalog, bearcat and aprications words inside.
- Begins
rule: will display the products with catalog words inside.
Switching to begins
rule can significantly increase search speed but use it only if you are familiar with the search behavior that it provides.
This option reflects on ajax search only.
When a user types something in the plugin search form there is a delay between when the search query was typed and when this search query request was sent to the server to perform the search and return the search results. This is made to not overload the server. Many frequent requests from the different users can lead to some performance issues on your server.
An AJAX timeout option has been made to prevent several server requests from the same users. By default it is set to 300
milliseconds. It is the recommended minimum. You can increase it at any value as you need. But remember that too great value can lead to pure user experience.
Option to set maximum allowed number of words for search query.
Very large search queries ( more than 10 words ) could potentially significantly increase the load on the server and increase search query time. That's why this option is very useful.
By default it is set to 6 words. Usually it is more than enough for almost all users. But you can set it to any value that you need. But it is recommended to keep it lower than 10 words.
If the search query has more words than specified in this option - they will be stripted. So if, for example, a user searches for Some very long search query that someone trying to use
this query will be reduced to Some very long search query that
. It's as if the rest of the query wasn't written by the user at all.
Another group of options is the Index table options.
Index table is the place where plugin stores all products words from the all available fields in normalized form. Index table gives the option to increase search speed and to provide more accurate search results.
Sometimes when there are too many products in your store the index table can be very large and that can reflect on search speed. In this case you can use the index table option to exclude from the index specific product fields. It is logical to exclude all fields that you are not using for searching.
These changes can lead to the great decrease in the index table size and, as the result, increasing in the search speed.
Another available option - excluding from index all product variations data. Use it if you are not using Product variations search. If there are many product variations inside your store this option can be very useful for you.
One more useful option is Run shortcodes. With this option you can choose - run any available shortcodes inside product content and index all generated data or not. Disabling this option can significantly decrease index table size and prevent indexing of unwanted data.
Note: After making any changes you need to re-index the table.