WP Engine has a feature which prevents long queries from being executed.
This is called the Long Query Governor.
Unfortunately this feature often prevents our queries from executing correctly, either when building the indexer via wp-admin or when running our queries on the frontend of your site.
You might see an error in your logs like this one:
KILLED QUERY (45767 characters long generated in /nas/content/live…
This means WP Engine’s long query governor stopped the query which can cause all kinds of issues when using our plugin.
Disabling the Long Query Governor
Fortunately there is an easy way to disable this feature – you will need to make a single code change to your site.
If you’re not comfortable making code changes to your site, please open a ticket with WP Engine support and ask them to do that for you, you can refer them to this article.
Step 1 – Edit wp-config.php
Via SFTP, login to your site and locate the wp-config.php
file in the root of your WordPress site, and edit it using a text editor.
Step 2 – Add a line of code to disable the long query governor
Near the bottom of the wp-config.php
file you will find a line like this:
# That's It. Pencils down
Create a new line above, and add this line of code:
define( 'WPE_GOVERNOR', false );
It should then look like this:
define( 'WPE_GOVERNOR', false );
# That's It. Pencils down
Once you’ve done that and saved the file back to your server, the query governor is disabled allowing Search & Filter to work correctly.
You will need to rebuild the index from the Search & Filter dashboard once you’ve completed this step.