title: Sphinx can not find a word, but can find phrase containing the same word
body: <p>I have run into a problem with working sphinx configuration.</p>
  
  <p>Data about configuration:</p>
  
  <pre><code>Sphinx 2.1.2-id64-release (r4245)
  </code></pre>
  
  <p>sphinx.conf source &amp; index</p>
  
  <pre><code>source articles
  {
      type                        = mysql
      sql_host                = localhost
      sql_user                = [x]
      sql_pass                = [x]
      sql_db                  = [x]
      sql_sock                = /var/run/mysqld/mysqld.sock
  
      sql_query = SELECT id, title, lead, body FROM articles
      sql_query_info      = SELECT * FROM articles WHERE id=$id
  }
  
  index articles
  {
  
      source          = articles
      path            = /data/sphinx/var/data/articles
      docinfo         = extern
      mlock           = 0
      morphology      = none
      min_word_len        = 2
      charset_type        = utf-8
      charset_table         = 0..9, A..Z-&gt;a..z, _, a..z, U+410..U+42F-&gt;U+430..U+44F, U+430..U+44F, U+100-&gt;a,U+101-&gt;a,U+10C-&gt;c,U+10D-&gt;c,U+112-&gt;e,U+113-&gt;e,U+122-&gt;g,U+123-&gt;g,U+12A-&gt;i,U+12B-&gt;i,U+136-&gt;k,U+137-&gt;k,U+13B-&gt;l,U+13C-&gt;l,U+145-&gt;n,U+146-&gt;n,U+160-&gt;s,U+161-&gt;s,U+16A-&gt;u,U+16B-&gt;u,U+17D-&gt;z,U+17E-&gt;z
      min_prefix_len  = 2
      enable_star     = 1
      html_strip              = 1
  
  }
  </code></pre>
  
  <p>The PHP that calls sphinx client looks like this:</p>
  
  <pre><code>$s = new SphinxClient;
  $s-&gt;setServer("localhost", 3312);
  echo $s-&gt;getLastError();
  $s-&gt;setMatchMode(SPH_MATCH_ANY);
  $s-&gt;setMaxQueryTime(3000);
  $result['articles'] = $s-&gt;query($s-&gt;escapeString($_GET['s']), 'articles');
  </code></pre>
  
  <p>The sphinx configuration seems to be working and the query and sphinx log do not show any errors.
  In the output PHP script I also have this call which also outputs nothing. 
  And there are no other PHP errors using E_ALL. </p>
  
  <pre><code>echo $s-&gt;getLastError();
  </code></pre>
  
  <p>Now, let's assume that there is an article with title A B (C D E), each letter being a word.
  ALL of the following queries have the article as 4th result in list:</p>
  
  <pre><code>A B (C D E)
  A B (C D
  A B (C
  A B
  A
  </code></pre>
  
  <p>At the same time, ALL of the following cannot find the article at all:</p>
  
  <pre><code>   B (C D E)
     B (C D
     B (C
     B
      *B
      *B*
  </code></pre>
  
  <p>Is this a feature of Sphinx?<br>
  I can't seem to find any mention that it should work like this, i.e. not being able to search by parts of sentence.<br>
  Is there a way to change this behaviour?<br>
  I looked at the match modes in the docs and tried out SPH_MATCH_EXTENDED, however, the results were even worse.<br><br>
  Thank you!</p>