title: Using SQLServer contains for partial words
body: <p>We are running many products search on a huge catalog with partially matched barcodes.</p>
  
  <p>We started with a simple like query</p>
  
  <p><code>select * from products where barcode like '%2345%'</code></p>
  
  <p>But that takes way too long since it requires a full table scan.
  We thought a fulltext search will be able to help us here using contains.</p>
  
  <p><code>select * from products where contains(barcode, '2345')</code></p>
  
  <p>But, it seems like contains doesn't support finding words that partially contains a text but, only full a word match or a prefix. (But in this example we're looking for '123456').</p>