*/
private void reindexContent( boolean includeSystemContent,
IndexWriter indexes ) {
if (indexes.canBeSkipped()) return;
// The node type schemata changes every time a node type is (un)registered, so get the snapshot that we'll use throughout
RepositoryCache repoCache = runningState.repositoryCache();
logger.debug(JcrI18n.reindexAll.text(runningState.name()));
if (includeSystemContent) {
NodeCache systemWorkspaceCache = repoCache.getWorkspaceCache(repoCache.getSystemWorkspaceName());
CachedNode rootNode = systemWorkspaceCache.getNode(repoCache.getSystemKey());
// Index the system content ...
logger.debug("Starting reindex of system content in '{0}' repository.", runningState.name());
reindexSystemContent(rootNode, Integer.MAX_VALUE, indexes);
logger.debug("Completed reindex of system content in '{0}' repository.", runningState.name());
}
// Index the non-system workspaces ...
for (String workspaceName : repoCache.getWorkspaceNames()) {
NodeCache workspaceCache = repoCache.getWorkspaceCache(workspaceName);
CachedNode rootNode = workspaceCache.getNode(workspaceCache.getRootKey());
logger.debug("Starting reindex of workspace '{0}' content in '{1}' repository.", runningState.name(), workspaceName);
reindexContent(workspaceName, workspaceCache, rootNode, Integer.MAX_VALUE, false, indexes);
logger.debug("Completed reindex of workspace '{0}' content in '{1}' repository.", runningState.name(), workspaceName);
}