title: Combine LIKE and CONTAINS in SAP HANA
body: <p>Consider the following entries in my table:</p>
  
  <ul>
  <li>red ap<strong>ple</strong> </li>
  <li>yellow ap<strong>ple</strong></li>
  <li>ap<strong>ple</strong> green</li>
  <li>red a<strong>ple</strong></li>
  <li>ap<strong>pel</strong> yellow</li>
  </ul>
  
  <p>Several people have populated this table using a non-consistend notation (the color <em>before</em> or <em>after</em> 'apple'), also entering some spelling errors.
  Now I want to query all entries with the word <code>apple</code>, regardless of color or spelling.</p>
  
  <p>With <code>FUZZY()</code>:</p>
  
  <pre><code>SELECT name FROM "NEO_123456789ABCDE"."MYTABLE1" WHERE contains(name, 'apple', FUZZY(0.5))  
  </code></pre>
  
  <p>I only get:</p>
  
  <ul>
  <li>red ap<strong>ple</strong></li>
  <li>red a<strong>ple</strong></li>
  </ul>
  
  <p>When adding wildcards:</p>
  
  <pre><code>SELECT name FROM "NEO_123456789ABCDE"."MYTABLE1" WHERE contains(name, '%apple%', FUZZY(0.5)) 
  </code></pre>
  
  <p>I only get all entries, where <code>apple</code> was spelled right:</p>
  
  <ul>
  <li>red ap<strong>ple</strong></li>
  <li>yellow ap<strong>ple</strong></li>
  <li>ap<strong>ple</strong> green</li>
  </ul>
  
  <p>Why I can't combine both operators <a href="https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/fa17f375191014a4d8d8cbfddfe340/content.htm?frameset=/en/20/f952437519101487edc3d9aba84238/frameset.htm&amp;current_toc=/en/2e/1ef8b4f4554739959886e55d4c127b/plain.htm&amp;node_id=15" rel="nofollow">LIKE</a> and <a href="http://help.sap.com/saphelp_hanaplatform/helpdata/en/9a/4da8f6f23b4ebf95c98f1104a56db4/content.htm" rel="nofollow">CONTAINS</a> in one query?</p>
  
  <p>I need to find:</p>
  
  <ul>
  <li>entries, where <code>apple</code> is surrounded by other words (in my case colors)</li>
  <li>all forms of <code>apple</code> (regardless of the spelling)</li>
  </ul>