docs: 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) {
              String systemWorkspaceName = repoCache.getSystemWorkspaceName();
              updateIndexesStatus(systemWorkspaceName, IndexManager.IndexStatus.ENABLED, IndexManager.IndexStatus.REINDEXING);
              NodeCache systemWorkspaceCache = repoCache.getWorkspaceCache(systemWorkspaceName);
              CachedNode rootNode = systemWorkspaceCache.getNode(repoCache.getSystemKey());
              // Index the system content ...
              logger.debug("Starting reindex of system content in '{0}' repository.", runningState.name());
              if (reindexSystemContent(rootNode, Integer.MAX_VALUE, indexes)) {
                  commitChanges(systemWorkspaceName);
              }
              logger.debug("Completed reindex of system content in '{0}' repository.", runningState.name());
              updateIndexesStatus(systemWorkspaceName, IndexManager.IndexStatus.REINDEXING, IndexManager.IndexStatus.ENABLED);
          }
  
          // Index the non-system workspaces ...
          for (String workspaceName : repoCache.getWorkspaceNames()) {
              // change the status of the indexes to reindexing
              updateIndexesStatus(workspaceName, IndexManager.IndexStatus.ENABLED, IndexManager.IndexStatus.REINDEXING);
              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);
              if (reindexContent(workspaceName, workspaceCache, rootNode, Integer.MAX_VALUE, false, indexes)) {
                  commitChanges(workspaceName);
              }
              logger.debug("Completed reindex of workspace '{0}' content in '{1}' repository.", runningState.name(), workspaceName);
              updateIndexesStatus(workspaceName, IndexManager.IndexStatus.REINDEXING, IndexManager.IndexStatus.ENABLED);
          }
      }