public void clearIndex(){
  IndexWriter writer=getWriter();
  try {
    writer.deleteAll();
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new RuntimeException(e);
  }
 finally {
    closeWriter(writer);
  }
}

public void clearIndex ( ) { IndexWriter writer = getWriter ( ) ; try { writer . deleteAll ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new RuntimeException ( e ) ; } finally { closeWriter ( writer ) ; } }
clears all the indices from the search index location ;
