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 of
SiteIndexer
.-
Field Summary
Modifier and TypeFieldDescriptionprotected SiteDocumentProviderExtensionPoint
The site document provider handler.protected SiteManager
The site manager.protected SolrClientProvider
The Solr client providerprotected SolrIndexer
The solr indexer.protected SolrPageIndexer
The solr page indexer.Fields inherited from interface org.ametys.web.indexing.SiteIndexer
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_indexContents
(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, SimpleProgressionTracker progressionTracker) Index the contents of a site.protected void
_indexResources
(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, SimpleProgressionTracker progressionTracker) Index the resources of a site.void
contextualize
(Context context) void
Index a site in all workspacesvoid
Index a site in a specific workspace.void
indexSite
(String siteName, String workspaceName, ContainerProgressionTracker progressionTracker) Index a site in a specific workspace.void
indexSite
(String siteName, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, ContainerProgressionTracker progressionTracker) Index a site in a specific workspace.void
indexSite
(String siteName, ContainerProgressionTracker progressionTracker) Index a site in all workspacesvoid
Index a site in all workspacesvoid
indexSite
(Site site, ContainerProgressionTracker progressionTracker) Index a site in a specific workspace.void
indexSitemap
(String siteName, String sitemapName) Index a sitemap in all workpacesvoid
indexSitemap
(String siteName, String sitemapName, String workspaceName) Index a sitemap in a specific workspace.void
indexSitemap
(Sitemap sitemap) Index a sitemap in all workpacesvoid
service
(ServiceManager manager) void
unindexSite
(String siteName) Unindex a site in all workspacesvoid
unindexSite
(String siteName, String workspaceName) Unindex a site in a specific workspace.void
unindexSitemap
(String siteName, String sitemapName) Unindex a sitemap in all workpacesvoid
unindexSitemap
(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 Details
-
_siteManager
The site manager. -
_solrIndexer
The solr indexer. -
_solrPageIndexer
The solr page indexer. -
_siteDocProviderEP
The site document provider handler. -
_solrClientProvider
The Solr client provider
-
-
Constructor Details
-
SolrSiteIndexer
public SolrSiteIndexer()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
indexSite
Description copied from interface:SiteIndexer
Index a site in all workspaces- Specified by:
indexSite
in interfaceSiteIndexer
- Parameters:
site
- the site to index.- Throws:
IndexingException
- If an error occurs while indexing the site.
-
indexSite
public void indexSite(Site site, ContainerProgressionTracker progressionTracker) throws IndexingException Description copied from interface:SiteIndexer
Index a site in a specific workspace.- Specified by:
indexSite
in interfaceSiteIndexer
- Parameters:
site
- the site to index.progressionTracker
- The progression of the indexation- Throws:
IndexingException
- If an error occurs while indexing the site.
-
indexSite
Description copied from interface:SiteIndexer
Index a site in all workspaces- Specified by:
indexSite
in 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, ContainerProgressionTracker progressionTracker) throws IndexingException Index a site in all workspaces- Parameters:
siteName
- the name of the site to index.progressionTracker
- The progression of the indexation- Throws:
IndexingException
- If an error occurs while indexing the site.
-
indexSite
Description copied from interface:SiteIndexer
Index a site in a specific workspace.- Specified by:
indexSite
in 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, ContainerProgressionTracker progressionTracker) throws IndexingException Description copied from interface:SiteIndexer
Index a site in a specific workspace.- Specified by:
indexSite
in interfaceSiteIndexer
- Parameters:
siteName
- the name of the site to index.workspaceName
- The workspace name.progressionTracker
- A progression tracker- 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, ContainerProgressionTracker progressionTracker) throws IndexingException Description copied from interface:SiteIndexer
Index a site in a specific workspace.- Specified by:
indexSite
in interfaceSiteIndexer
- Parameters:
siteName
- the name of the site to index.workspaceName
- The workspace name.solrClient
- The solr client to useprogressionTracker
- The progression of the indexation- Throws:
IndexingException
- If an error occurs while indexing the site.
-
indexSitemap
Description copied from interface:SiteIndexer
Index a sitemap in all workpaces- Specified by:
indexSitemap
in interfaceSiteIndexer
- Parameters:
sitemap
- the sitemap to index.- Throws:
IndexingException
- If an error occurs while indexing the sitemap.
-
indexSitemap
Description copied from interface:SiteIndexer
Index a sitemap in all workpaces- Specified by:
indexSitemap
in 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:SiteIndexer
Index a sitemap in a specific workspace.- Specified by:
indexSitemap
in 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
Description copied from interface:SiteIndexer
Unindex a site in all workspaces- Specified by:
unindexSite
in interfaceSiteIndexer
- Parameters:
siteName
- the name of site to unindex.- Throws:
IndexingException
- If an error occurs while unindexing the site.
-
unindexSite
Description copied from interface:SiteIndexer
Unindex a site in a specific workspace.- Specified by:
unindexSite
in interfaceSiteIndexer
- Parameters:
siteName
- the name of site to unindex.workspaceName
- The workspace name.- Throws:
IndexingException
- If an error occurs while unindexing the site.
-
unindexSitemap
Description copied from interface:SiteIndexer
Unindex a sitemap in all workpaces- Specified by:
unindexSitemap
in 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:SiteIndexer
Unindex a sitemap in a specific workspace.- Specified by:
unindexSitemap
in 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, SimpleProgressionTracker progressionTracker) throws Exception Index the contents of a site.- Parameters:
site
- The site to index.workspaceName
- The workspace namesolrClient
- The solr client to useprogressionTracker
- The progression of the indexation- Throws:
Exception
- If an error occurs indexing the contents.
-
_indexResources
protected void _indexResources(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, SimpleProgressionTracker progressionTracker) throws Exception Index the resources of a site.- Parameters:
site
- The site to index.workspaceName
- The workspace namesolrClient
- The solr client to useprogressionTracker
- The progression of the indexation- Throws:
Exception
- If an error occurs indexing the resources.
-