Package org.ametys.web.indexing.solr
Class SolrSiteIndexer
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.indexing.solr.SolrSiteIndexer
-
- All Implemented Interfaces:
LogEnabled,SiteIndexer,Contextualizable,Serviceable
public class SolrSiteIndexer extends AbstractLogEnabled implements SiteIndexer, Serviceable, Contextualizable
Solr implementation ofSiteIndexer.
-
-
Field Summary
Fields Modifier and Type Field Description protected SiteDocumentProviderExtensionPoint_siteDocProviderEPThe site document provider handler.protected SiteManager_siteManagerThe site manager.protected SolrClientProvider_solrClientProviderThe Solr client providerprotected SolrIndexer_solrIndexerThe solr indexer.protected SolrPageIndexer_solrPageIndexerThe solr page indexer.-
Fields inherited from interface org.ametys.web.indexing.SiteIndexer
ROLE
-
-
Constructor Summary
Constructors Constructor Description SolrSiteIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_indexContents(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient)Index the contents of a site.protected void_indexResources(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient)Index the resources of a site.voidcontextualize(Context context)voidindexSite(String siteName)Index a site in all workspacesvoidindexSite(String siteName, String workspaceName)Index a site in a specific workspace.voidindexSite(String siteName, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient)Index a site in a specific workspace.voidindexSite(Site site)Index a site in all workspacesvoidindexSitemap(String siteName, String sitemapName)Index a sitemap in all workpacesvoidindexSitemap(String siteName, String sitemapName, String workspaceName)Index a sitemap in a specific workspace.voidindexSitemap(Sitemap sitemap)Index a sitemap in all workpacesvoidservice(ServiceManager manager)voidunindexSite(String siteName)Unindex a site in all workspacesvoidunindexSite(String siteName, String workspaceName)Unindex a site in a specific workspace.voidunindexSitemap(String siteName, String sitemapName)Unindex a sitemap in all workpacesvoidunindexSitemap(String siteName, String sitemapName, String workspaceName)Unindex a sitemap in a specific workspace.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_siteManager
protected SiteManager _siteManager
The site manager.
-
_solrIndexer
protected SolrIndexer _solrIndexer
The solr indexer.
-
_solrPageIndexer
protected SolrPageIndexer _solrPageIndexer
The solr page indexer.
-
_siteDocProviderEP
protected SiteDocumentProviderExtensionPoint _siteDocProviderEP
The site document provider handler.
-
_solrClientProvider
protected SolrClientProvider _solrClientProvider
The Solr client provider
-
-
Constructor Detail
-
SolrSiteIndexer
public SolrSiteIndexer()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
indexSite
public void indexSite(Site site) throws IndexingException
Description copied from interface:SiteIndexerIndex a site in all workspaces- Specified by:
indexSitein interfaceSiteIndexer- Parameters:
site- the site to index.- Throws:
IndexingException- If an error occurs while indexing the site.
-
indexSite
public void indexSite(String siteName) throws IndexingException
Description copied from interface:SiteIndexerIndex a site in all workspaces- Specified by:
indexSitein interfaceSiteIndexer- Parameters:
siteName- the name of the site to index.- Throws:
IndexingException- If an error occurs while indexing the site.
-
indexSite
public void indexSite(String siteName, String workspaceName) throws IndexingException
Description copied from interface:SiteIndexerIndex a site in a specific workspace.- Specified by:
indexSitein interfaceSiteIndexer- Parameters:
siteName- the name of the site to index.workspaceName- The workspace name.- Throws:
IndexingException- If an error occurs while indexing the site.
-
indexSite
public void indexSite(String siteName, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws IndexingException
Description copied from interface:SiteIndexerIndex a site in a specific workspace.- Specified by:
indexSitein interfaceSiteIndexer- Parameters:
siteName- the name of the site to index.workspaceName- The workspace name.solrClient- The solr client to use- Throws:
IndexingException- If an error occurs while indexing the site.
-
indexSitemap
public void indexSitemap(Sitemap sitemap) throws IndexingException
Description copied from interface:SiteIndexerIndex a sitemap in all workpaces- Specified by:
indexSitemapin interfaceSiteIndexer- Parameters:
sitemap- the sitemap to index.- Throws:
IndexingException- If an error occurs while indexing the sitemap.
-
indexSitemap
public void indexSitemap(String siteName, String sitemapName) throws IndexingException
Description copied from interface:SiteIndexerIndex a sitemap in all workpaces- Specified by:
indexSitemapin interfaceSiteIndexer- Parameters:
siteName- the site name.sitemapName- the name of the sitemap to index.- Throws:
IndexingException- If an error occurs while indexing the sitemap.
-
indexSitemap
public void indexSitemap(String siteName, String sitemapName, String workspaceName) throws IndexingException
Description copied from interface:SiteIndexerIndex a sitemap in a specific workspace.- Specified by:
indexSitemapin interfaceSiteIndexer- Parameters:
siteName- the site name.sitemapName- the name of the sitemap to index.workspaceName- The workspace name.- Throws:
IndexingException- If an error occurs while indexing the sitemap.
-
unindexSite
public void unindexSite(String siteName) throws IndexingException
Description copied from interface:SiteIndexerUnindex a site in all workspaces- Specified by:
unindexSitein interfaceSiteIndexer- Parameters:
siteName- the name of site to unindex.- Throws:
IndexingException- If an error occurs while unindexing the site.
-
unindexSite
public void unindexSite(String siteName, String workspaceName) throws IndexingException
Description copied from interface:SiteIndexerUnindex a site in a specific workspace.- Specified by:
unindexSitein interfaceSiteIndexer- Parameters:
siteName- the name of site to unindex.workspaceName- The workspace name.- Throws:
IndexingException- If an error occurs while unindexing the site.
-
unindexSitemap
public void unindexSitemap(String siteName, String sitemapName) throws IndexingException
Description copied from interface:SiteIndexerUnindex a sitemap in all workpaces- Specified by:
unindexSitemapin interfaceSiteIndexer- Parameters:
siteName- the site name.sitemapName- the name of the sitemap to index.- Throws:
IndexingException- If an error occurs while unindexing the sitemap.
-
unindexSitemap
public void unindexSitemap(String siteName, String sitemapName, String workspaceName) throws IndexingException
Description copied from interface:SiteIndexerUnindex a sitemap in a specific workspace.- Specified by:
unindexSitemapin interfaceSiteIndexer- Parameters:
siteName- the site name.sitemapName- the name of the sitemap to index.workspaceName- The workspace name.- Throws:
IndexingException- If an error occurs while unindexing the sitemap.
-
_indexContents
protected void _indexContents(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
Index the contents of a site.- Parameters:
site- The site to index.workspaceName- The workspace namesolrClient- The solr client to use- Throws:
Exception- If an error occurs indexing the contents.
-
_indexResources
protected void _indexResources(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
Index the resources of a site.- Parameters:
site- The site to index.workspaceName- The workspace namesolrClient- The solr client to use- Throws:
Exception- If an error occurs indexing the resources.
-
-