protected void reindexKBArticles(long companyId) throws Exception {
    int count =
        KBArticleLocalServiceUtil.getCompanyKBArticlesCount(
            companyId, WorkflowConstants.STATUS_APPROVED);

    int pages = count / Indexer.DEFAULT_INTERVAL;

    for (int i = 0; i <= pages; i++) {
      int start = (i * Indexer.DEFAULT_INTERVAL);
      int end = start + Indexer.DEFAULT_INTERVAL;

      reindexKBArticles(companyId, start, end);
    }
  }