final String[] wsNames = repository.getWorkspaceNames();
final String systemWS = repository.getConfiguration().getSystemWorkspaceName();
for (String wsName : wsNames)
{
inspectionLog.logComment("Check SearchIndex consistency. Workspace " + wsName);
SearchManager searchManager =
(SearchManager)repository.getWorkspaceContainer(wsName).getComponent(SearchManager.class);
searchManager.checkIndex(inspectionLog, systemWS.equals(wsName));
}
}