/** * @see org.opencms.search.CmsSearchIndex#initialize() */ @Override public void initialize() throws CmsSearchException { super.initialize(); getFieldConfiguration().init(); try { OpenCms.getSearchManager().registerSolrIndex(this); } catch (CmsConfigurationException ex) { LOG.error(ex.getMessage(), ex); setEnabled(false); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions() */ @Override public void executeListSingleActions() throws IOException, ServletException { CmsSearchManager searchManager = OpenCms.getSearchManager(); CmsListItem item = getSelectedItem(); String indexsourceName = (String)item.get(LIST_COLUMN_NAME); String action = getParamListAction(); if (action.equals(LIST_ACTION_ADDSOURCE) || action.equals(LIST_COLUMN_ADDSOURCE2)) { CmsSearchIndex idx = searchManager.getIndex(getParamIndexName()); idx.addSourceName(indexsourceName); try { idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } } refreshList(); writeConfiguration(false); } else if (action.equals(CmsSearchIndexSourceControlList.LIST_ACTION_OVERVIEW_INDEXSOURCE)) { // action currently unused (not triggered by a column any more) Map<String, String[]> params = new HashMap<String, String[]>(); // forward to the edit indexsource screen params.put(A_CmsEditIndexSourceDialog.PARAM_INDEXSOURCE, new String[] {indexsourceName}); params.put(PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW}); getToolManager().jspForwardTool(this, "/searchindex/indexsources/indexsource", params); } }
idx.removeSourceName((String)item.get(LIST_COLUMN_NAME)); try { idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) {
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions() */ @Override public void executeListMultiActions() { CmsSearchManager searchManager = OpenCms.getSearchManager(); CmsListItem item = getSelectedItem(); if (getParamListAction().equals(LIST_MACTION_ADDSOURCE)) { // execute the delete multiaction Iterator<CmsListItem> itItems = getSelectedItems().iterator(); String indexSource; CmsSearchIndex idx = searchManager.getIndex(getParamIndexName()); while (itItems.hasNext()) { item = itItems.next(); indexSource = (String)item.get(LIST_COLUMN_NAME); idx.addSourceName(indexSource); } try { idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } } writeConfiguration(false); refreshList(); } listSave(); }
idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) {
index.initialize(); } catch (Exception e) { if (CmsLog.INIT.isWarnEnabled()) {
index.initialize(); } catch (CmsException e) {
if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { try { searchIndex.initialize(); } catch (CmsException e) {
if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { try { searchIndex.initialize(); } catch (CmsSearchException e) {