Index: src/wp-admin/includes/class-wp-ms-sites-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-ms-sites-list-table.php	(revision 37688)
+++ src/wp-admin/includes/class-wp-ms-sites-list-table.php	(working copy)
@@ -83,7 +83,7 @@
 		$s = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST[ 's' ] ) ) : '';
 		$wild = '';
 		if ( false !== strpos($s, '*') ) {
-			$wild = '%';
+			$wild = '*';
 			$s = trim($s, '*');
 		}
 
@@ -98,7 +98,11 @@
 				$_GET['order'] = $_REQUEST['order'] = 'DESC';
 		}
 
-		$query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
+		$args = array(
+			'number'     => intval( $per_page ),
+			'offset'     => intval( ( $pagenum - 1 ) * $per_page ),
+			'network_id' => $current_site->id,
+		);
 
 		if ( empty($s) ) {
 			// Nothing to do.
@@ -107,67 +111,66 @@
 					preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) ||
 					preg_match( '/^[0-9]{1,3}\.$/', $s ) ) {
 			// IPv4 address
-			$sql = $wpdb->prepare( "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", $wpdb->esc_like( $s ) . $wild );
+			$sql = $wpdb->prepare( "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", $wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' ) );
 			$reg_blog_ids = $wpdb->get_col( $sql );
 
-			if ( !$reg_blog_ids )
-				$reg_blog_ids = array( 0 );
+			if ( $reg_blog_ids ) {
+				$args['site__in'] = $reg_blog_ids;
+			}
+		} elseif ( is_numeric( $s ) && empty( $wild ) ) {
+			$args['ID'] = $s;
+		} else {
+			$args['search'] = $s;
 
-			$query = "SELECT *
-				FROM {$wpdb->blogs}
-				WHERE site_id = '{$wpdb->siteid}'
-				AND {$wpdb->blogs}.blog_id IN (" . implode( ', ', $reg_blog_ids ) . ")";
-		} else {
-			if ( is_numeric($s) && empty( $wild ) ) {
-				$query .= $wpdb->prepare( " AND ( {$wpdb->blogs}.blog_id = %s )", $s );
-			} elseif ( is_subdomain_install() ) {
-				$blog_s = str_replace( '.' . $current_site->domain, '', $s );
-				$blog_s = $wpdb->esc_like( $blog_s ) . $wild . $wpdb->esc_like( '.' . $current_site->domain );
-				$query .= $wpdb->prepare( " AND ( {$wpdb->blogs}.domain LIKE %s ) ", $blog_s );
-			} else {
-				if ( $s != trim('/', $current_site->path) ) {
-					$blog_s = $wpdb->esc_like( $current_site->path . $s ) . $wild . $wpdb->esc_like( '/' );
-				} else {
-					$blog_s = $wpdb->esc_like( $s );
-				}
-				$query .= $wpdb->prepare( " AND  ( {$wpdb->blogs}.path LIKE %s )", $blog_s );
+			if ( ! is_subdomain_install() ) {
+				$args['search_columns'] = array( 'path' );
 			}
 		}
 
 		$order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : '';
-		if ( $order_by === 'registered' ) {
-			$query .= ' ORDER BY registered ';
-		} elseif ( $order_by === 'lastupdated' ) {
-			$query .= ' ORDER BY last_updated ';
-		} elseif ( $order_by === 'blogname' ) {
+		if ( 'registered' === $order_by ) {
+			// registered is named properly.
+		} elseif ( 'lastupdated' === $order_by ) {
+			$order_by = 'last_updated';
+		} elseif ( 'blogname' === $order_by ) {
 			if ( is_subdomain_install() ) {
-				$query .= ' ORDER BY domain ';
+				$order_by = 'domain';
 			} else {
-				$query .= ' ORDER BY path ';
+				$order_by = 'path';
 			}
-		} elseif ( $order_by === 'blog_id' ) {
-			$query .= ' ORDER BY blog_id ';
-		} else {
-			$order_by = null;
+		} elseif ( 'blog_id' === $order_by ) {
+			$order_by = 'id';
+		} elseif ( ! $order_by ) {
+			$order_by = false;
 		}
 
-		if ( isset( $order_by ) ) {
-			$order = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC";
-			$query .= $order;
+		$args['orderby'] = $order_by;
+
+		if ( $order_by ) {
+			$args['order'] = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC";
 		}
 
-		// Don't do an unbounded count on large networks
-		if ( ! wp_is_large_network() )
-			$total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) );
+		if ( wp_is_large_network() ) {
+			$args['no_found_rows'] = true;
+		} else {
+			$args['no_found_rows'] = false;
+		}
 
-		$query .= " LIMIT " . intval( ( $pagenum - 1 ) * $per_page ) . ", " . intval( $per_page );
-		$this->items = $wpdb->get_results( $query, ARRAY_A );
+		$_sites = get_sites( $args );
+		if ( is_array( $_sites ) ) {
+			update_site_cache( $_sites );
 
-		if ( wp_is_large_network() )
-			$total = count($this->items);
+			$this->items = array_slice( $_sites, 0, $per_page );
+		}
 
+		$total_sites = get_sites( array_merge( $args, array(
+			'count' => true,
+			'offset' => 0,
+			'number' => 0,
+		) ) );
+
 		$this->set_pagination_args( array(
-			'total_items' => $total,
+			'total_items' => $total_sites,
 			'per_page' => $per_page,
 		) );
 	}
@@ -445,6 +448,7 @@
 	 */
 	public function display_rows() {
 		foreach ( $this->items as $blog ) {
+			$blog = $blog->to_array();
 			$class = '';
 			reset( $this->status_list );
 
Index: src/wp-includes/class-wp-site-query.php
===================================================================
--- src/wp-includes/class-wp-site-query.php	(revision 37688)
+++ src/wp-includes/class-wp-site-query.php	(working copy)
@@ -141,6 +141,8 @@
 	 *     @type int          $spam              Limit results to spam sites. Accepts '1' or '0'. Default empty.
 	 *     @type int          $deleted           Limit results to deleted sites. Accepts '1' or '0'. Default empty.
 	 *     @type string       $search            Search term(s) to retrieve matching sites for. Default empty.
+	 *     @type array        $search_columns    Array of column names to be searched. Accepts 'domain' and 'path'.
+	 *                                           Default empty array.
 	 *     @type bool         $update_site_cache Whether to prime the cache for found sites. Default false.
 	 * }
 	 */
@@ -170,6 +172,7 @@
 			'spam'              => null,
 			'deleted'           => null,
 			'search'            => '',
+			'search_columns'    => array(),
 			'count'             => false,
 			'date_query'        => null, // See WP_Date_Query
 			'update_site_cache' => true,
@@ -481,10 +484,30 @@
 
 		// Falsey search strings are ignored.
 		if ( strlen( $this->query_vars['search'] ) ) {
-			$this->sql_clauses['where']['search'] = $this->get_search_sql(
-				$this->query_vars['search'],
-				array( 'domain', 'path' )
-			);
+			$search_columns = array();
+
+			if ( $this->query_vars['search_columns'] ) {
+				$search_columns = array_intersect( $this->query_vars['search_columns'], array( 'domain', 'path' ) );
+			}
+
+			if ( ! $search_columns ) {
+				$search_columns = array( 'domain', 'path' );
+			}
+
+			/**
+			 * Filters the columns to search in a WP_Site_Query search.
+			 *
+			 * The default columns include 'domain' and 'path.
+			 *
+			 * @since 4.6.0
+			 *
+			 * @param array         $search_columns Array of column names to be searched.
+			 * @param string        $search         Text being searched.
+			 * @param WP_Site_Query $this           The current WP_Site_Query instance.
+			 */
+			$search_columns = apply_filters( 'site_search_columns', $search_columns, $this->query_vars['search'], $this );
+
+			$this->sql_clauses['where']['search'] = $this->get_search_sql( $this->query_vars['search'], $search_columns );
 		}
 
 		$date_query = $this->query_vars['date_query'];
@@ -563,7 +586,11 @@
 	protected function get_search_sql( $string, $columns ) {
 		global $wpdb;
 
-		$like = '%' . $wpdb->esc_like( $string ) . '%';
+		if ( false !== strpos( $string, '*' ) ) {
+			$like = '%' . implode( '%', array_map( array( $wpdb, 'esc_like' ), explode( '*', $string ) ) ) . '%';
+		} else {
+			$like = '%' . $wpdb->esc_like( $string ) . '%';
+		}
 
 		$searches = array();
 		foreach ( $columns as $column ) {
Index: tests/phpunit/tests/multisite/siteQuery.php
===================================================================
--- tests/phpunit/tests/multisite/siteQuery.php	(revision 37688)
+++ tests/phpunit/tests/multisite/siteQuery.php	(working copy)
@@ -470,6 +470,84 @@
 
 		$this->assertEquals( $expected, $found );
 	}
+
+	public function test_wp_site_query_by_search_with_text_in_path_exclude_domain_from_search() {
+		$q = new WP_Site_Query();
+		$found = $q->query( array(
+			'fields' => 'ids',
+			'search' => 'make',
+			'search_columns' => array( 'path' ),
+		) );
+
+		$expected = array(
+			self::$site_ids['www.w.org/make/'],
+		);
+
+		$this->assertEquals( $expected, $found );
+	}
+
+	public function test_wp_site_query_by_search_with_text_in_domain_exclude_path_from_search() {
+		$q = new WP_Site_Query();
+		$found = $q->query( array(
+			'fields' => 'ids',
+			'search' => 'make',
+			'search_columns' => array( 'domain' ),
+		) );
+
+		$expected = array(
+			self::$site_ids['make.wordpress.org/'],
+			self::$site_ids['make.wordpress.org/foo/'],
+		);
+
+		$this->assertEquals( $expected, $found );
+	}
+
+	public function test_wp_site_query_by_search_with_wildcard_in_text() {
+		$q = new WP_Site_Query();
+		$found = $q->query( array(
+			'fields'       => 'ids',
+			'search'       => 'm*ke',
+		) );
+
+		$expected = array(
+			self::$site_ids['www.w.org/make/'],
+			self::$site_ids['make.wordpress.org/'],
+			self::$site_ids['make.wordpress.org/foo/'],
+		);
+
+		$this->assertEqualSets( $expected, $found );
+	}
+
+	public function test_wp_site_query_by_search_with_wildcard_in_text_exclude_path_from_search() {
+		$q = new WP_Site_Query();
+		$found = $q->query( array(
+			'fields' => 'ids',
+			'search' => 'm*ke',
+			'search_columns' => array( 'domain' ),
+		) );
+
+		$expected = array(
+			self::$site_ids['make.wordpress.org/'],
+			self::$site_ids['make.wordpress.org/foo/'],
+		);
+
+		$this->assertEqualSets( $expected, $found );
+	}
+
+	public function test_wp_site_query_by_search_with_wildcard_in_text_exclude_domain_from_search() {
+		$q = new WP_Site_Query();
+		$found = $q->query( array(
+			'fields' => 'ids',
+			'search' => 'm*ke',
+			'search_columns' => array( 'path' ),
+		) );
+
+		$expected = array(
+			self::$site_ids['www.w.org/make/'],
+		);
+
+		$this->assertEqualSets( $expected, $found );
+	}
 }
 
 endif;
Index: tests/phpunit/tests/multisite/wpMSSitesListTable.php
===================================================================
--- tests/phpunit/tests/multisite/wpMSSitesListTable.php	(revision 37688)
+++ tests/phpunit/tests/multisite/wpMSSitesListTable.php	(working copy)
@@ -73,8 +73,11 @@
 
 		$expected = array(
 			self::$site_ids['wordpress.org/foo/'],
+			self::$site_ids['wordpress.org/foo/bar/'],
+			self::$site_ids['wordpress.org/afoo/'],
 			self::$site_ids['make.wordpress.org/foo/'],
 			self::$site_ids['www.w.org/foo/'],
+			self::$site_ids['www.w.org/foo/bar/'],
 		);
 
 		$this->assertEqualSets( $expected, $items );
@@ -131,6 +134,9 @@
 
 		$expected = array(
 			self::$site_ids['test.example.org/'],
+			self::$site_ids['test2.example.org/'],
+			self::$site_ids['test3.example.org/zig/'],
+			self::$site_ids['atest.example.org/'],
 		);
 
 		$this->assertEqualSets( $expected, $items );
@@ -154,6 +160,7 @@
 			self::$site_ids['test.example.org/'],
 			self::$site_ids['test2.example.org/'],
 			self::$site_ids['test3.example.org/zig/'],
+			self::$site_ids['atest.example.org/'],
 		);
 
 		$this->assertEqualSets( $expected, $items );
@@ -176,6 +183,7 @@
 		$expected = array(
 			self::$site_ids['wordpress.org/foo/'],
 			self::$site_ids['wordpress.org/foo/bar/'],
+			self::$site_ids['wordpress.org/afoo/'],
 			self::$site_ids['make.wordpress.org/foo/'],
 			self::$site_ids['www.w.org/foo/'],
 			self::$site_ids['www.w.org/foo/bar/'],
