Index: src/wp-includes/class-wp-query.php
===================================================================
--- src/wp-includes/class-wp-query.php	(revision 38787)
+++ src/wp-includes/class-wp-query.php	(working copy)
@@ -721,7 +721,8 @@
 	 *     @type array        $post_name__in           An array of post slugs that results must match.
 	 *     @type string       $s                       Search keyword(s). Prepending a term with a hyphen will
 	 *                                                 exclude posts matching that term. Eg, 'pillow -sofa' will
-	 *                                                 return posts containing 'pillow' but not 'sofa'.
+	 *                                                 return posts containing 'pillow' but not 'sofa'. This feature
+	 *                                                 can be disabled using the filter wp_query_use_hyphen_for_negation.
 	 *     @type int          $second                  Second of the minute. Default empty. Accepts numbers 0-60.
 	 *     @type bool         $sentence                Whether to search by phrase. Default false.
 	 *     @type bool         $suppress_filters        Whether to suppress filters. Default false.
@@ -1318,10 +1319,20 @@
 		$n = ! empty( $q['exact'] ) ? '' : '%';
 		$searchand = '';
 		$q['search_orderby_title'] = array();
+
+		/**
+		 * Filters whether to exclude search terms preceded with a hyphen
+		 *
+		 * @since 4.7.0
+		 *
+		 * @param bool Whether the search query exclude terms preceded with a hyphen
+		 */
+		$hyphen_exclusion = apply_filters( 'wp_query_use_hyphen_for_negation', '__return_true' );
+
 		foreach ( $q['search_terms'] as $term ) {
 			// Terms prefixed with '-' should be excluded.
 			$include = '-' !== substr( $term, 0, 1 );
-			if ( $include ) {
+			if ( $include || ! $hyphen_exclusion ) {
 				$like_op  = 'LIKE';
 				$andor_op = 'OR';
 			} else {
Index: tests/phpunit/tests/query/search.php
===================================================================
--- tests/phpunit/tests/query/search.php	(revision 38787)
+++ tests/phpunit/tests/query/search.php	(working copy)
@@ -60,6 +60,35 @@
 	}
 
 	/**
+	 * @ticket 38099
+	 */
+	function test_filter_wp_query_use_hyphen_for_negation() {
+		$title = '-HYPHENATION_TEST';
+
+		// Create a post with a title which starts with a hyphen
+		$post_id = self::factory()->post->create( array(
+			'post_content' => $title, 'post_type' => $this->post_type
+		) );
+
+		// By default, we can use the hyphen prefix to exclude results
+		$this->assertEquals( array(), $this->get_search_results( $title ) );
+
+		// After we disable the feature using the filter, we should get the result
+		add_filter( 'wp_query_use_hyphen_for_negation', array( $this, 'filter_wp_query_use_hyphen_for_negation' ) );
+		$result = $this->get_search_results( $title );
+		$post = array_pop( $result );
+		$this->assertEquals( $post->ID, $post_id );
+		remove_filter( 'wp_query_use_hyphen_for_negation', array( $this, 'filter_wp_query_use_hyphen_for_negation' ) );
+	}
+
+	/**
+	 * @ticket 38099
+	 */
+	function filter_wp_query_use_hyphen_for_negation() {
+		return false;
+	}
+
+	/**
 	 * @ticket 33988
 	 */
 	public function test_s_should_exclude_term_prefixed_with_dash() {
