* Clean all indexes and reindex all content.
*
* @param async true if the reindexing should be done in the background, or false if it should be done using this thread
*/
protected void cleanAndReindex( boolean async ) {
final IndexWriter writer = getIndexWriter();
scan(async, getIndexWriter(), new Callable<Void>() {
@SuppressWarnings( "synthetic-access" )
@Override
public Void call() throws Exception {
writer.clearAllIndexes();
reindexContent(true, writer);
return null;
}
});
}