title: SQL Server full-text search for phrase containing a hyphen doesn't return expected results
body: <p>We have an application that using a SQL Server 2008 database, and full-text search. I'm trying to understand why the following searches behave differently:</p>
  
  <p>First, a phrase containing a hyphenated word, like this:</p>
  
  <pre><code>contains(column_name, '"one two-three-four five"')
  </code></pre>
  
  <p>And second, an identical phrase, where the hyphens are replaced by spaces:</p>
  
  <pre><code>contains(column_name, '"one two three four five"')
  </code></pre>
  
  <p>The full-text index uses the ENGLISH (1033) locale, and the default system stoplist.</p>
  
  <p>From my observations of other full-text searches containing hyphenated words, the first one should allow for matches on either <code>one two three four five</code> or <code>one twothreefour five</code>. Instead, it only matches <code>one twothreefour five</code> (and not <code>one two-three-four five</code>).</p>
  
  <hr>
  
  <p><strong>Test Case</strong></p>
  
  <p>Setup:</p>
  
  <pre><code>create table ftTest 
  (
      Id int identity(1,1) not null, 
      Value nvarchar(100) not null, 
      constraint PK_ftTest primary key (Id)
  );
  
  insert ftTest (Value) values ('one two-three-four five');
  insert ftTest (Value) values ('one twothreefour five');
  
  create fulltext catalog ftTest_catalog;
  create fulltext index on ftTest (Value language 1033)
      key index PK_ftTest on ftTest_catalog;
  GO
  </code></pre>
  
  <p>Queries:</p>
  
  <pre><code>--returns one match
  select * from ftTest where contains(Value, '"one two-three-four five"')
  
  --returns two matches
  select * from ftTest where contains(Value, '"one two three four five"')
  select * from ftTest where contains(Value, 'one and "two-three-four five"')
  select * from ftTest where contains(Value, '"one two-three-four" and five')
  GO
  </code></pre>
  
  <p>Cleanup:</p>
  
  <pre><code>drop fulltext index on ftTest
  drop fulltext catalog ftTest_catalog;
  drop table ftTest;
  </code></pre>