title: Generate Lucene segments_N file
body: <p>While moving Lucene index files from a server to an other, I forgot to move the segments_N file (because I use the pattern <code>*.*</code>)</p>
  
  <p>Unfortunately I've erased the original folder, and I only have these files in my directory now :</p>
  
  <pre><code>_1rpt.fdt
  _1rpt.fdx
  _1rpt.fnm
  _1rpt.nvd
  _1rpt.nvm
  _1rpt.si
  _1rpt_Lucene50_0.doc
  _1rpt_Lucene50_0.dvd
  _1rpt_Lucene50_0.dvm
  _1rpt_Lucene50_0.pos
  _1rpt_Lucene50_0.tim
  _1rpt_Lucene50_0.tip
  write.lock
  </code></pre>
  
  <p>I am missing the <code>segments_42u</code> file, and without it I cannot even do an <code>org.apache.lucene.index.CheckIndex</code> :</p>
  
  <pre><code>Exception in thread "main" org.apache.lucene.index.IndexNotFoundException: no segments* file found in MMapDirectory@/solr-5.3.1/nodes/node1/core/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@119d7047: files: [write.lock, _1rpt.fdt, _1rpt.fdx, _1rpt.fnm, _1rpt.nvd, _1rpt.nvm, _1rpt.si, _1rpt_Lucene50_0.doc, _1rpt_Lucene50_0.dvd, _1rpt_Lucene50_0.dvm, _1rpt_Lucene50_0.pos, _1rpt_Lucene50_0.tim, _1rpt_Lucene50_0.tip]
  at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:483)
  at org.apache.lucene.index.CheckIndex.doMain(CheckIndex.java:2354)
  at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:2237)
  </code></pre>
  
  <p>The index is pretty huge (> 800GB) and it will take weeks to rebuild it.</p>
  
  <p>Is there a way to generate this missing segment info file ?</p>
  
  <p>Thanks a lot for your help.</p>