<?php

// @link https://searchwp.com/documentation/multisite/
// Tell SearchWP to search the entire Multisite network when searching on the main site.
add_filter( 'searchwp\query\args', function( $args, $query ) {
	// If this is not site 1, bail out.
	if ( 1 !== get_current_blog_id() ) {
	  return $args;
	}

	// Search sites with ID 1, 2, 3.
	$args['site'] = [1,2,3];

	// Retain site info in results.
	$args['fields'] = 'default';

	return $args;
}, 10, 2 );