for (CmsSearchIndexSource idxSource : idx.getSources()) { html.append(" <li>\n").append(" ").append("name : ").append(idxSource.getName()).append("\n"); html.append(" </li>");
/** * Returns the available search indexes of this installation. * * @return the available search indexes of this installation */ private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); return sources; }
/** * Returns the available search indexes of this installation. * * @return the available search indexes of this installation */ private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); return sources; }
/** * Returns the available search indexes of this installation. * * @return the available search indexes of this installation */ private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); return sources; }
while (itIndexes.hasNext()) { idx = itIndexes.next(); refsources = idx.getSources(); if (refsources != null) { if (refsources.contains(indexsource)) {
while (itIndexes.hasNext()) { idx = itIndexes.next(); refsources = idx.getSources(); if (refsources != null) { if (refsources.contains(indexsource)) {
/** * Returns <code>true</code> if at least one of the index sources uses a VFS indexer that is able * to index locale dependent resources.<p> * * TODO This should be improved somehow * * @return <code>true</code> if this field configuration should resolve locale dependencies */ private boolean hasLocaleDependencies() { for (CmsSearchIndexSource source : getIndex().getSources()) { if (source.getIndexer().isLocaleDependenciesEnable()) { return true; } } return false; } }
if ((res != null) && (getSources() != null)) { for (CmsSearchIndexSource source : getSources()) { if (source.isIndexing(res.getRootPath(), result.getName()) || (source.isIndexing(res.getRootPath(), TYPE_XMLCONTENT)
/** * Updates the offline search indexes for the given list of resources.<p> * * @param report the report to write the index information to * @param resourcesToIndex the list of {@link CmsPublishedResource} objects to index */ protected void updateIndexOffline(I_CmsReport report, List<CmsPublishedResource> resourcesToIndex) { CmsObject cms = m_adminCms; try { // copy the administration context for the indexing cms = OpenCms.initCmsObject(m_adminCms); // set site root and project for this index cms.getRequestContext().setSiteRoot("/"); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } Iterator<CmsSearchIndex> j = m_offlineIndexes.iterator(); while (j.hasNext()) { CmsSearchIndex index = j.next(); if (index.getSources() != null) { try { // switch to the index project cms.getRequestContext().setCurrentProject(cms.readProject(index.getProject())); updateIndexIncremental(cms, index, report, resourcesToIndex); } catch (CmsException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_UPDATE_INDEX_FAILED_1, index.getName()), e); } } } }
/** * Updates the offline search indexes for the given list of resources.<p> * * @param report the report to write the index information to * @param resourcesToIndex the list of {@link CmsPublishedResource} objects to index */ protected void updateIndexOffline(I_CmsReport report, List<CmsPublishedResource> resourcesToIndex) { CmsObject cms = m_adminCms; try { // copy the administration context for the indexing cms = OpenCms.initCmsObject(m_adminCms); // set site root and project for this index cms.getRequestContext().setSiteRoot("/"); } catch (CmsException e1) { // NOOP, should never happen } Iterator<CmsSearchIndex> j = m_offlineIndexes.iterator(); while (j.hasNext()) { CmsSearchIndex index = j.next(); if (index.getSources() != null) { try { // switch to the index project cms.getRequestContext().setCurrentProject(cms.readProject(index.getProject())); updateIndexIncremental(cms, index, report, resourcesToIndex); } catch (CmsException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_UPDATE_INDEX_FAILED_1, index.getName()), e); } } } }
if ((searchIndex.getSources() == null) || (searchIndex.getPath() == null)) { if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { try {
if ((searchIndex.getSources() == null) || (searchIndex.getPath() == null)) { if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { try {
Iterator<CmsSearchIndexSource> sources = index.getSources().iterator(); while (sources.hasNext()) {
Iterator<CmsSearchIndexSource> sources = index.getSources().iterator(); while (sources.hasNext()) {
Iterator<CmsSearchIndexSource> sources = index.getSources().iterator(); while (sources.hasNext()) {
Iterator<CmsSearchIndexSource> sources = index.getSources().iterator(); while (sources.hasNext()) {