title: Lucene.NET - sorting by int
body: <p>In the latest version of Lucene (or Lucene.NET), what is the proper way to get the search results back in sorted order?</p>
  
  <p>I have a document like this:</p>
  
  <pre><code>var document = new Lucene.Document();
  document.AddField("Text", "foobar");
  document.AddField("CreationDate", DateTime.Now.Ticks.ToString()); // store the date as an int
  
  indexWriter.AddDocument(document);
  </code></pre>
  
  <p>Now I want do a search and get my results back in order of most recent.</p>
  
  <p><strong>How can I do a search that orders results by CreationDate?</strong> All the documentation I see is for old Lucene versions that use now-deprecated APIs.</p>