Support » Plugin: Relevanssi - A Better Search » Only use Relevanssi in blogs, not Woocommerce

  • supervinnie40

    (@supervinnie40)


    Advanced Woo Search

    Hi there,

    I have a Woocommerce shop with a large blog. Because of so many blog-article, I needed a better way to search through them and filter the results.
    My theme comes with the Advanced Woo Search (AWS) for Woocommerce, which works really nice for the products (and only products).

    Currently I have things set up, that Advanced Woo Search (AWS) only works for products, and the blog section uses the standard WordPress search function.

    Activating Relevanssi causes AWS to stop functioning properly. The Ajax drop-down results work, but the AWS search page ends in a blank page.

    Is there a way to force Relevanssi to ONLY work on the blog section, and do nothing (at all) with the Woocommerce section?
    That way I can keep using AWS for Woocommerce, and Relevanssi for the blog-section.

    P.s. I also use Search & Filter to fine-tune the search results in the blog-section, which doesn’t seem to affect anything on the Woocommerce search results.

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter supervinnie40

    (@supervinnie40)

    I would be inclined to say it does. Searching products goes as it should do.

    Only thing I would need to check, is why the Search & Filter part has become really slow. If you enter a search term and choose a category, the page doesn’t respond until 10 to 20 seconds later. But I have not yet been able to see if it has anything to do with your filter or your plugin at all.

    The form is at:
    https://www.carcarenederland.nl/blog/
    on the right side. (it is in Dutch)

    Plugin Author Mikko Saari

    (@msaari)

    Do you have Query Monitor? If not, install that, it should be able to tell you what’s taking so long.

    Thread Starter supervinnie40

    (@supervinnie40)

    Thank you, I don’t have that but I’m gonna install it right away.

    Thread Starter supervinnie40

    (@supervinnie40)

    I’m not yet familiar with what I should look for, but the search result page (after waiting 20 seconds) shows that I have 15 times WP_Query->get_posts() in the section “Double query’s”. That seems like a bit too much.
    Most of those are from Woocommerce and I don’t see many Relevanssi. When I sort the items on “Time”, only relevanssi_populate_array() is in the top 10, all other Relevanssi mentionings are below 0.002 seconds and seem (to my untrained eye) as not very relevant?

    But again, not knowing what to look for, I might be completely wrong. I’ll try to find some more information on what to look for.

    Plugin Author Mikko Saari

    (@msaari)

    There should be a special section for slow queries if there are any. Queries start to be slow if they take 0.1 s or more.

    You can also look at “Queries by Caller” and sort the list by time to see what takes most time.

    Thread Starter supervinnie40

    (@supervinnie40)

    Thank you for the tip. Looking at it like that tells me that the worst are:

    WP_Query->get_posts() 107 0,0983
    WP_Term_Query->get_terms() 58 0,0821

    Clicking WP_Query->get_posts() gives me several mentionings of Woocommerce, with Relevanssi somewhere further down with 0.005 seconds.

    Plugin Author Mikko Saari

    (@msaari)

    That’s nowhere near 20 seconds, though, so probably not the cause of the problem. It’s very hard to say, to figure out what’s happening would require profiling. That would tell you exactly what’s taking so long. Profiling isn’t easy though, so I would recommend hiring someone who’s good at WordPress performance optimization to look at this for you.

    Thread Starter supervinnie40

    (@supervinnie40)

    Thank you, for the effort in helping me and the time you spent on helping me out with this. I’ll dive into this part myself with some professional help.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Only use Relevanssi in blogs, not Woocommerce’ is closed to new replies.