/** * Rebuilds (if required creates) the index with the given name.<p> * * @param indexName the name of the index to rebuild * @param report the report object to write messages (or <code>null</code>) * * @throws CmsException if something goes wrong */ public void rebuildIndex(String indexName, I_CmsReport report) throws CmsException { try { SEARCH_MANAGER_LOCK.lock(); // get the search index by name CmsSearchIndex index = getIndex(indexName); // update the index updateIndex(index, report, null); // clean up the extraction result cache cleanExtractionCache(); } finally { SEARCH_MANAGER_LOCK.unlock(); } }
/** * Rebuilds (if required creates) the index with the given name.<p> * * @param indexName the name of the index to rebuild * @param report the report object to write messages (or <code>null</code>) * * @throws CmsException if something goes wrong */ public synchronized void rebuildIndex(String indexName, I_CmsReport report) throws CmsException { // get the search index by name CmsSearchIndex index = getIndex(indexName); // update the index updateIndex(index, report, null); // clean up the extraction result cache cleanExtractionCache(); }
cleanExtractionCache(); } finally { SEARCH_MANAGER_LOCK.unlock();
/** * Rebuilds (if required creates) the List of indexes with the given name.<p> * * @param indexNames the names (String) of the index to rebuild * @param report the report object to write messages (or <code>null</code>) * * @throws CmsException if something goes wrong */ public synchronized void rebuildIndexes(List<String> indexNames, I_CmsReport report) throws CmsException { Iterator<String> i = indexNames.iterator(); while (i.hasNext()) { String indexName = i.next(); // get the search index by name CmsSearchIndex index = getIndex(indexName); if (index != null) { // update the index updateIndex(index, report, null); } else { if (LOG.isWarnEnabled()) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_NO_INDEX_WITH_NAME_1, indexName)); } } } // clean up the extraction result cache cleanExtractionCache(); }
cleanExtractionCache(); if (container != null) {
/** * Rebuilds (if required creates) all configured indexes.<p> * * @param report the report object to write messages (or <code>null</code>) * * @throws CmsException if something goes wrong */ public synchronized void rebuildAllIndexes(I_CmsReport report) throws CmsException { CmsMessageContainer container = null; for (int i = 0, n = m_indexes.size(); i < n; i++) { // iterate all configured search indexes CmsSearchIndex searchIndex = m_indexes.get(i); try { // update the index updateIndex(searchIndex, report, null); } catch (CmsException e) { container = new CmsMessageContainer( Messages.get(), Messages.ERR_INDEX_REBUILD_ALL_1, new Object[] {searchIndex.getName()}); LOG.error(Messages.get().getBundle().key(Messages.ERR_INDEX_REBUILD_ALL_1, searchIndex.getName()), e); } } // clean up the extraction result cache cleanExtractionCache(); if (container != null) { // throw stored exception throw new CmsSearchException(container); } }
cleanExtractionCache(); } finally { Thread.currentThread().setPriority(oldPrio);
cleanExtractionCache(); } finally { SEARCH_MANAGER_LOCK.unlock();