title: Wildcard search issue sphinx
body: <p>I'm getting the following error while trying a wildcard(*) enabled search in Sphinx 2.0.6</p>
  
  <blockquote>
    <p>index products: syntax error, unexpected $undefined near '*'</p>
  </blockquote>
  
  <p>My search term is <code>iphone 4s*</code></p>
  
  <p>It's using the products index as defined below.</p>
  
  <pre><code>index users
  {
    enable_star = 1
    docinfo = extern
    morphology = stem_en
    charset_table = 0..9, A..Z-&gt;a..z, _, a..z, U+410..U+42F-&gt;U+430..U+44F, U+430..U+44F
    ignore_chars = U+0021..U+002F,U+003A..U+003F,U+0060
    charset_type = utf-8
    html_strip = 0
  
    source = gdgt_user
    path = /var/lib/sphinxsearch/data/gdgt/users
    min_infix_len = 3
    min_word_len = 3
  }
  
  index products : users
  {
    enable_star = 1
    min_infix_len = 1
    min_word_len = 1
    source = gdgt_products
    path = /var/lib/sphinxsearch/data/gdgt/products
  }
  </code></pre>
  
  <p>I am using the php api that can be found in the source tar ball.
  I am able to see the error when using search CLI.</p>
  
  <pre><code>search -c app/config/sphinx.compiled.conf -i products -e "ipho*"
  Sphinx 2.0.6-id64-release (r3473)
  Copyright (c) 2001-2012, Andrew Aksyonoff
  Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
  
  using config file 'app/config/sphinx.compiled.conf'...
  index 'products': search error: .
  </code></pre>
  
  <p>My php code looks like</p>
  
  <pre><code>$client = new SphinxClient();
  $client-&gt;SetServer($serverIp, $serverPort);
  $client-&gt;SetMaxQueryTime(5000);
  $client-&gt;SetSortMode(SPH_SORT_RELEVANCE);
  $client-&gt;SetMatchMode(SPH_MATCH_EXTENDED);
  $res = $client-&gt;query('ipho*', 'products');
  
  var_dump($res, $client-&gt;getLastError(), $client-&gt;getLastWarning());
  </code></pre>