How to Index and Search multiple terms and phrases with Lucene
<p>I am using Lucene.NET to index the contents of a set of documents.  My index contains several fields, but I'm mainly concerned with querying the "contents" field.  I'm trying to figure out the best way of indexing, as well as creating the query, to meet the requirements.  </p>

<p>Here are the current requirements:</p>

<ul>
<li>Able to search multiple keywords, such as "planes trains automobiles" (minus the quotes).  This should give me all documents that contain ANY of the terms, but the documents that contain all three should be at the top</li>
<li>Able to search for phrases, such as "planes, trains, and automobiles" (with quotes) which would only match if they were together in that order.  </li>
<li>As for stop words, I would be ok with either ignoring them altogether, or including them.  </li>
<li>As for punctuation or special characters, same deal.  I can either ignore them completely, or include them.  </li>
<li>The last two just need to be consistent, not necessarily with each other, but with how the indexer and searcher handles them.  So I just don't want to have a case where the user searches for "planes and trains" but it doesn't match a document that does contain that phrase, because the indexer took out the "and" but the searcher is trying to search for that particular phrase.  </li>
</ul>

<p>Some of the documents are large, so I think we don't want to do Field.Store.Yes, right?  Unless we have to for what we need to do.  </p>