First, thank you.
I won't use your plugin as it is right now but it will be a very useful basis to me for a quite similar need (I only need specific post types and post metas, not only for search but also displaying posts on the front page). Also thank you because I wasn't aware of VIEW in sql, it seems to be a good solution for the performance problem of this case.
Maybe I'm wrong, but here is something that can cause troubles imho:
In your function
ms_global_search_init() you use the actions
archive_blog, etc. While digging into
wp-includes/ms-blogs.php => update_blog_status() I see there are more available actions not listed in your function:
unmature_blog, etc. Shouldn't they be used to update your VIEW?
A simple (and maybe stupid) though: in your shortcode you use
get_blog_permalink(), and it uses
switch_to_blog(), which seems to add many things in cache. Wouldn't that be an issue? I mean, as far as I understand, VIEW allow us to reduce the number of requests to the database and the cache size, so, wouldn't that be counter-productive to use
Thanks again :)