Skip Navigation

[Closed] Using Relevanssi for filters

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 3 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2062773

Is it possible to use Relevanssi when a search query is not entered?

Relevanssi loads results much faster than Toolset. However Toolset seems to be used when no filter options are entered and loads very slowly.

Thanks

#2063737

Hello,

Toolset Blocks/Views plugins are using WordPress built-in class WP_Query to query posts:
https://developer.wordpress.org/reference/classes/wp_query/

If there are lots of posts in your website, you can follow our document to optimize the query:
https://toolset.com/documentation/legacy-features/views-plugin/how-to-use-views-parametric-search-on-large-sites/

And you can follow below document to use Relevanssi to extend the search capabilities of the custom searches you build with Toolset:
https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/

#2066445

We are actually already caching results using WP Rocket, so I feel this will do the same anyway? As your suggestion here - https://toolset.com/documentation/legacy-features/views-plugin/how-to-use-views-parametric-search-on-large-sites/

Correct me if I am wrong though?

Is there no way to have these filter results run through Relevanssi? As when someone uses the search field which goes through Relevanssi the load time is pretty reasonable. However if they purely use filters its really slow.

If there’s no way to do this, what’s going to help these perform better? Faster CPUs? Moving to nVME SSDs?

Thanks.

#2067219

Toolset Blocks/Views plugins are using it's own cache system, so it is not same as WP Rocket plugin.

As I mentioned above, please follow our documents to optimize the query:
https://toolset.com/documentation/legacy-features/views-plugin/how-to-use-views-parametric-search-on-large-sites/

If you are running a website with lots of plugins/custom theme + large data, you can also consider to increase PHP memory limitation :
https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php

And you can also try to debug the slow query manually:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#the-views-debug-tool
section "The Views debug tool"

Views plugin has a built-in debug mode, which helps you analyze the output of any View or Content Template in details.

#2070991
Screenshot 2021-05-28 at 10.24.35.png

Hi Luo,

I don't think "How to Use Views Custom Search on Large Sites" applies as the page has filters, it says on the help page if using filters then you can't use Toolset cache for the view? I do have cache view enabled anyway but I think when the filters are used this kills using the Toolset cache?

I could increase PHP memory limit but I can't see how this would help? I would think if it doesn't have enough memory it would fail not simply go slower?

I have tried the Toolset debug tool but the data didn't really mean a lot to me to be honest, I have attached a screenshot though.

Looking at server monitoring we barely ever get close to maxing out CPU and RAM we have several GB spare always. So I feel like its not resources of the server. I mentioned using faster hardware (e.g NVMes) but I am guessing its more about optimising the queries then?

#2072155

Please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

The topic ‘[Closed] Using Relevanssi for filters’ is closed to new replies.