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 ; }
Checks whether a built of the indices is necessary .