title: Howto perform a 'contains' search rather than 'starts with' using Lucene.Net
body: <p>We use Lucene.NET to implement a full text search on a clients website. The search itself works already but we now want to implement a modification.</p>
  
  <p>Currently all terms get appended a <code>*</code> which leads Lucene to perform what I would classify as a <code>StartsWith</code> search.</p>
  
  <p>In the future we would like to have a search that performs something like a <code>Contains</code> rather than a <code>StartsWith</code>.</p>
  
  <p>We use</p>
  
  <ul>
  <li>Lucene.Net 2.9.2.2</li>
  <li>StandardAnalyzer</li>
  <li>default QueryParser</li>
  </ul>
  
  <p>Samples:</p>
  
  <p><code>(Title:Orch*)</code> matches: <code>Orchestra</code>  </p>
  
  <p>but:  </p>
  
  <p><code>(Title:rch*)</code> does not match: <code>Orchestra</code></p>
  
  <p>We want the first and the second one to both match <code>Orchestra</code>.  </p>
  
  <p>Basically I want the exact opposite of what was asked in this question, I'm not sure why for this person Lucene performed a <code>Contains</code> and rather than a <code>StartsWith</code> by default:<br>
  <a href="https://stackoverflow.com/questions/605899/why-is-this-lucene-query-a-contains-instead-of-a-startswith">Why is this Lucene query a &quot;contains&quot; instead of a &quot;startsWith&quot;?</a></p>
  
  <p>How can we make this happen?<br>
  I have the feeling it has something to do with the Analyzer but I'm not sure.</p>