@SuppressWarnings("unchecked")
public void backgroundTask() throws Exception
{
Collection<WikiPage> allPages = m_engine.getPageManager().getAllPages();
SearchManager mgr = m_engine.getSearchManager();
m_max = allPages.size();
ProgressItem pi = new ProgressItem() {
public int getProgress()
{
return 100 * m_count / m_max;
}
};
m_engine.getProgressManager().startProgress( pi, PROGRESS_ID );
for( WikiPage page : allPages )
{
mgr.reindexPage(page);
m_count++;
}
m_engine.getProgressManager().stopProgress( PROGRESS_ID );
shutdown();