Index: src/wp-includes/query.php
===================================================================
--- src/wp-includes/query.php	(revision 26975)
+++ src/wp-includes/query.php	(working copy)
@@ -1965,7 +1965,7 @@
 			if ( $n )
 				$q['search_orderby_title'][] = "$wpdb->posts.post_title LIKE '%$term%'";
 
-			$search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))";
+			$search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_name LIKE '{$n}{$term}{$n}'))";
 			$searchand = ' AND ';
 		}
 
Index: tests/phpunit/tests/query/search.php
===================================================================
--- tests/phpunit/tests/query/search.php	(revision 0)
+++ tests/phpunit/tests/query/search.php	(working copy)
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Search functionality
+ *
+ * @group query
+ * @group search
+ */
+class Tests_Query_Search extends WP_UnitTestCase {
+
+	function test_search_by_fields() {
+		$post_id = $this->factory->post->create( array( 'post_title' => 'Taco', 'post_name' => 'burrito', 'post_content' => 'Enchilada' ) );
+
+		// post slug
+		$q1 = new WP_Query( array( 's' => 'Burrito', 'fields' => 'ids' ) );
+		$this->assertEquals( array( $post_id ), $q1->posts );
+
+		// post title
+		$q2 = new WP_Query( array( 's' => 'taco', 'fields' => 'ids' ) );
+		$this->assertEquals( array( $post_id ), $q2->posts );
+		
+		// post content
+		$q3 = new WP_Query( array( 's' => 'enchilada', 'fields' => 'ids' ) );
+		$this->assertEquals( array( $post_id ), $q3->posts );
+	}
+}
\ No newline at end of file
