title: How to search within Sphinx results using partial words?
body: <p>I have a form and when I enter a value, I want to get the results on submit;</p>
  
  <p>If I search for <code>fish</code> and I have a <code>fishing</code> value I want to get all the data that contain the <code>fish</code> value;</p>
  
  <p>In my code, I get the results that I need only if I enter the full <code>fishing</code> word;</p>
  
  <p>I am searching for the full expression and also for each word from the expression;</p>
  
  <pre><code>$sphinx_search = Yii::app()-&gt;search;
          $sphinx_search-&gt;setSelect('*');
  
          $sphinx_search_final = '';
  
          $sphinx_search_query = trim($this-&gt;q);
          if (strlen($sphinx_search_query) &gt; 0) {
              $sphinx_search_query = str_replace('-', ' ', $sphinx_search_query);
              $keys = explode(' ', $sphinx_search_query);
              foreach ($keys as $k =&gt; $key) {
                  if ($key) {
                      $keys[$k] = $key;
                  } else {
                      unset($keys[$k]);
                  }
              }
              if (count($keys) &gt; 0) {
                  $sphinx_search_final = ' @(position_name,employer_name,employer_first_name,employer_last_name,employer_position) ' . $sphinx_search_query .
                          ' @(position_name,employer_name,employer_first_name,employer_last_name,employer_position) ' . implode('|', $keys);
              }
          }
  </code></pre>