title: Lucene.NET - Search phrase containing "and"
body: <p>Looking for advice on handling ampersands and the word "and" in Lucene queries. My test queries are (including quotes):</p>
  
  <ul>
  <li>"oil and gas field" (complete phrase)</li>
  <li>"research and development" (complete phrase)</li>
  <li>"r&amp;d" (complete phrase)</li>
  </ul>
  
  <p>Ideally, I'd like to use the <code>QueryParser</code> as the input is coming from the user.</p>
  
  <p>During testing and doc reading, I found that using the <code>StandardAnalyzer</code> doesn't work for what I want. For the first two queries, a <code>QueryParser.Parse</code> converts them to:</p>
  
  <pre><code>contents:"oil gas field"
  contents:"research development"
  </code></pre>
  
  <p>Which isn't what I want. If I use a <code>PhraseQuery</code> instead, I get no results (presumably because "and" isn't indexed.</p>
  
  <p>If I use a <code>SimpleAnalyzer</code>, then I can find the phrases but <code>QueryParser.Parse</code> converts the last term to:</p>
  
  <pre><code>contents:"r d"
  </code></pre>
  
  <p>Which again, isn't quite what I'm looking for.</p>
  
  <p>Any advice?</p>