• Resolved Kees Lamper

    (@keeslamper)


    We’re using the WP Search with Algolia plugin on a multisite with WooCommerce. But when we search on the main site we get results from the subsite.

    Also in Algolia we see all products twice, one from main and one from subsite.

    Is it possible to index only the main site products? I can’t figure out and Algolia support isn’t so good helping..

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Do you have the plugin active in all the subsites? Or just the main site? If all the subsites, have you also been actively indexing? Or perhaps just accidentally by simply working on your content?

    I suspect if you have it active in all of them, then the index prefix is also just wp_ in all of the sites, making it push and update content from all sites to 1 index.

    However, I’ll wait until I have more information/confirmations before I try any new suggestions.

    Thread Starter Kees Lamper

    (@keeslamper)

    Hi Michael,

    No it’s only active on the main website.

    Regards,
    Kees

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I know we have had occasional issues raised around multisite but I’ve never managed to recreate the issue.

    It should only be indexing the current site in the network it’s activated in, not across all of them.

    Do you know if you have any plugins or code that are meant to aggregate content from other sites, to display all in one place? I could see that potentially causing some issue if it’s getting all collected before WPSwA does its queries to push up to the index.

    Thread Starter Kees Lamper

    (@keeslamper)

    We only use WooMultistore. Is there no option to exclude on domain or whatever?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That’s kind of the thing because logically based on my experiences with the plugin, and what I’ve mentioned above, we shouldn’t technically need to do any sort of domain exclusion.

    Here’s where we fetch a new batch of content to index, if I’m not mistaken:

    https://github.com/WebDevStudios/wp-search-with-algolia/blob/main/includes/indices/class-algolia-searchable-posts-index.php#L422-L450

    Standard WP_Query request. However, there’s many ways and places that other plugins could be interjecting and amending what and how things are being queried, thus affecting our results.

    If you have a staging/dev site that you could recreate on it’d be interesting to see if deactivating some other plugins, re-indexing, and checking the results afterwards to see if it’s only what’s expected, would be nice. Then you could start re-activating one by one and re-indexing to see when the problem returns.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not an exact issue match, but definitely a similar one https://wordpress.org/support/topic/re-indexation-mixes-posts-from-the-different-subsites/

    I’m curious if their solution at https://wordpress.org/support/topic/re-indexation-mixes-posts-from-the-different-subsites/#post-16108038 would work in your case, and ms_is_switched() is a core function, not something they created on their own.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress multisite indexing’ is closed to new replies.