/** * Overridden to initialize the internal <code>CmsSearchManager</code> before initWorkplaceRequestValues -> * defineWidgets -> will access it (NPE). <p> * * @see org.opencms.workplace.CmsWorkplace#initWorkplaceMembers(org.opencms.jsp.CmsJspActionElement) */ @Override protected void initWorkplaceMembers(CmsJspActionElement jsp) { m_searchManager = OpenCms.getSearchManager(); super.initWorkplaceMembers(jsp); }
/** * Gets the index to use for queries.<p> * * @return the index to use for queries */ private CmsSolrIndex getIndex() { String indexName = m_indexName; if (indexName == null) { return null; } return OpenCms.getSearchManager().getIndexSolr(indexName); }
/** * Overridden to initialize the internal <code>CmsSearchManager</code> before initWorkplaceRequestValues -> * defineWidgets -> will access it (NPE). <p> * * @see org.opencms.workplace.CmsWorkplace#initWorkplaceMembers(org.opencms.jsp.CmsJspActionElement) */ @Override protected void initWorkplaceMembers(CmsJspActionElement jsp) { m_searchManager = OpenCms.getSearchManager(); super.initWorkplaceMembers(jsp); }
/** * Overridden to initialize the internal <code>CmsSearchManager</code> before initWorkplaceRequestValues -> * defineWidgets -> will access it (NPE). <p> * * @see org.opencms.workplace.CmsWorkplace#initWorkplaceMembers(org.opencms.jsp.CmsJspActionElement) */ @Override protected void initWorkplaceMembers(CmsJspActionElement jsp) { m_searchManager = OpenCms.getSearchManager(); super.initWorkplaceMembers(jsp); }
/** * Overridden to initialize the internal <code>CmsSearchManager</code> before initWorkplaceRequestValues -> * defineWidgets -> will access it (NPE). <p> * * @see org.opencms.workplace.CmsWorkplace#initWorkplaceMembers(org.opencms.jsp.CmsJspActionElement) */ @Override protected void initWorkplaceMembers(CmsJspActionElement jsp) { m_searchManager = OpenCms.getSearchManager(); super.initWorkplaceMembers(jsp); }
/** * Returns the available search indexes of this installation. * * @return the available search indexes of this installation */ private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); return new LinkedList<CmsSearchIndexSource>(manager.getSearchIndexSources().values()); } }
/** * Overridden to initialize the internal <code>CmsSearchManager</code> before initWorkplaceRequestValues -> * defineWidgets -> will access it (NPE). <p> * * @see org.opencms.workplace.CmsWorkplace#initWorkplaceMembers(org.opencms.jsp.CmsJspActionElement) */ @Override protected void initWorkplaceMembers(CmsJspActionElement jsp) { m_searchManager = OpenCms.getSearchManager(); super.initWorkplaceMembers(jsp); }
/** * Returns <code>true</code> if Solr search is enabled.<p> * * @return <code>true</code> if Solr search is enabled */ private boolean isSolrEnabled() { boolean solrEnabled = OpenCms.getSearchManager().getSolrServerConfiguration().isEnabled(); CmsSolrIndex solrIndex = OpenCms.getSearchManager().getIndexSolr(CmsSolrIndex.DEFAULT_INDEX_NAME_OFFLINE); return solrEnabled && (solrIndex != null); } }
/** * @see org.opencms.ade.galleries.shared.rpc.I_CmsGalleryService#updateIndex() */ public void updateIndex() throws CmsRpcException { try { OpenCms.getSearchManager().updateOfflineIndexes(); } catch (Throwable e) { error(e); } }
/** * @see org.opencms.search.I_CmsSearchDocument#addFileSizeField(int) */ public void addFileSizeField(int length) { if (OpenCms.getSearchManager().getSolrServerConfiguration().getSolrSchema().hasExplicitField( CmsSearchField.FIELD_SIZE)) { m_doc.addField(CmsSearchField.FIELD_SIZE, new Integer(length)); } }
/** * Returns the configured resources of the current indexsource. * * @return the configured resources of the current indexsource */ private List<String> resources() { return OpenCms.getSearchManager().getIndexSource(getParamIndexsource()).getResourcesNames(); }
/** * 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; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // will throw NPE if something wrong OpenCms.getSearchManager().getFieldConfiguration(getParamFieldconfiguration()).getFields(); }
/** * Rebuilds (if required creates) the given search index.<p> * * @param index name of the index to update * @throws Exception if something goes wrong * @see org.opencms.search.CmsSearchManager#rebuildIndex(String, org.opencms.report.I_CmsReport) */ public void rebuildIndex(String index) throws Exception { OpenCms.getSearchManager().rebuildIndex(index, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
/** * Rebuilds (if required creates) all configured search indexes.<p> * * @throws Exception if something goes wrong * * @see org.opencms.search.CmsSearchManager#rebuildAllIndexes(org.opencms.report.I_CmsReport) */ public void rebuildAllIndexes() throws Exception { I_CmsReport report = new CmsShellReport(m_cms.getRequestContext().getLocale()); OpenCms.getSearchManager().rebuildAllIndexes(report); }
/** * Rebuilds (if required creates) all configured search indexes.<p> * * @throws Exception if something goes wrong * * @see org.opencms.search.CmsSearchManager#rebuildAllIndexes(org.opencms.report.I_CmsReport) */ public void rebuildAllIndexes() throws Exception { I_CmsReport report = new CmsShellReport(m_cms.getRequestContext().getLocale()); OpenCms.getSearchManager().rebuildAllIndexes(report); }
/** * Generates the directory on the RFS for this index.<p> * * @return the directory on the RFS for this index */ protected String generateIndexDirectory() { return OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf( OpenCms.getSearchManager().getDirectory() + "/" + getName()); }
/** * Rebuilds (if required creates) the given search index.<p> * * @param index name of the index to update * @throws Exception if something goes wrong * @see org.opencms.search.CmsSearchManager#rebuildIndex(String, org.opencms.report.I_CmsReport) */ public void rebuildIndex(String index) throws Exception { OpenCms.getSearchManager().rebuildIndex(index, new CmsShellReport(m_cms.getRequestContext().getLocale())); }