title: Set Lucene Document to arbitrary id
body: <p>In the 5 minute tutorial after getting the hit list</p>
  
  <pre><code>ScoreDoc[] hits = collector.topDocs().scoreDocs;
  </code></pre>
  
  <p>Documents are obtained using</p>
  
  <pre><code>for(int i=0;i&lt;hits.length;++i) {
      int docId = hits[i].doc;
      Document d = searcher.doc(docId);
      System.out.println((i + 1) + ". " + d.get("isbn") + "\t" + d.get("title"));
  }
  </code></pre>
  
  <p>So I see that <code>scoreDoc.doc</code> is the <code>docId</code>. Is there a way to set <strong>this</strong> <code>docId</code> to an arbitrary value during indexing?</p>