code: public static boolean updatingIndexNecessesary(CmsObject cms) {
  
          // Set request to the offline project.
          setCmsOfflineProject(cms);
  
          // Check whether the spellcheck index directories are empty.
          // If they are, the index has to be built obviously.
          if (isSolrSpellcheckIndexDirectoryEmpty()) {
              return true;
          }
  
          // Compare the most recent date of a dictionary with the oldest timestamp
          // that determines when an index has been built.
          long dateMostRecentDictionary = getMostRecentDate(cms);
          long dateOldestIndexWrite = getOldestIndexDate(cms);
  
          return dateMostRecentDictionary > dateOldestIndexWrite;
      }
docs: Checks whether a built of the indices is necessary.
  @param cms The appropriate CmsObject instance.
  @return true, if the spellcheck indices have to be rebuilt, otherwise false