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.
Hi Michael,
No it’s only active on the main website.
Regards,
Kees
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.
We only use WooMultistore. Is there no option to exclude on domain or whatever?
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.
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.