title: Lucene 3.6 Index File Optimisation after Backup Restore
body: <p>I am using lucene 3.6 as a search engine for a java desktop application.
   A directory file to used to store the lucene index.</p>
  
  <p>The application has a backup operation that backs up the database.
   The question is that when the backup database is restored, how do I optimize the 
   lucene index directory to reflect the new database and not the old database. </p>
  
  <p>For example :</p>
  
  <p>Index File A contains index for database A.</p>
  
  <p>Database B is restored into the system. Current database is B. 
   How do I make index file store index for database B and not A.</p>
  
  <p>Do I have to rebuild the index (undesirable if the database is large) , 
  or is there another way out.</p>
  
  <p>best regards ,</p>
  
  <p>CodeAngel</p>