public class SolrSiteIndexer extends AbstractLogEnabled implements SiteIndexer, Serviceable, Contextualizable
SiteIndexer.| Modifier and Type | Field and Description |
|---|---|
private Context |
_context |
protected SiteDocumentProviderExtensionPoint |
_siteDocProviderEP
The site document provider handler.
|
protected SiteManager |
_siteManager
The site manager.
|
protected SolrClientProvider |
_solrClientProvider
The Solr client provider
|
protected SolrIndexer |
_solrIndexer
The solr indexer.
|
protected SolrPageIndexer |
_solrPageIndexer
The solr page indexer.
|
ROLE| Constructor and Description |
|---|
SolrSiteIndexer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_indexContents(Site site,
String workspaceName,
SolrClient solrClient)
Index the contents of a site.
|
protected void |
_indexResources(Site site,
String workspaceName,
SolrClient solrClient)
Index the resources of a site.
|
private void |
_indexSite(String siteName,
String workspaceName,
SolrClient solrClient,
boolean commitAndOptimize) |
private void |
_indexSitemap(String siteName,
String sitemapName,
String workspaceName,
SolrClient solrClient) |
private void |
_indexSitemaps(Site site,
String workspaceName,
SolrClient solrClient) |
private void |
_unindexSiteDocuments(String siteName,
String workspaceName,
SolrClient solrClient) |
private void |
_unindexSitemapDocuments(String siteName,
String sitemapName,
String workspace,
SolrClient solrClient) |
void |
contextualize(Context context) |
void |
indexSite(Site site)
Index a site in all workspaces
|
void |
indexSite(String siteName)
Index a site in all workspaces
|
void |
indexSite(String siteName,
String workspaceName)
Index a site in a specific workspace.
|
void |
indexSite(String siteName,
String workspaceName,
SolrClient solrClient)
Index a site in a specific workspace.
|
void |
indexSitemap(Sitemap sitemap)
Index a sitemap in all workpaces
|
void |
indexSitemap(String siteName,
String sitemapName)
Index a sitemap in all workpaces
|
void |
indexSitemap(String siteName,
String sitemapName,
String workspaceName)
Index a sitemap in a specific workspace.
|
void |
service(ServiceManager manager) |
void |
unindexSite(String siteName)
Unindex a site in all workspaces
|
void |
unindexSite(String siteName,
String workspaceName)
Unindex a site in a specific workspace.
|
void |
unindexSitemap(String siteName,
String sitemapName)
Unindex a sitemap in all workpaces
|
void |
unindexSitemap(String siteName,
String sitemapName,
String workspaceName)
Unindex a sitemap in a specific workspace.
|
getLogger, setLoggerprotected SiteManager _siteManager
protected SolrIndexer _solrIndexer
protected SolrPageIndexer _solrPageIndexer
protected SiteDocumentProviderExtensionPoint _siteDocProviderEP
protected SolrClientProvider _solrClientProvider
public SolrSiteIndexer()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void indexSite(Site site) throws IndexingException
SiteIndexerindexSite in interface SiteIndexersite - the site to index.IndexingException - If an error occurs while indexing the site.public void indexSite(String siteName) throws IndexingException
SiteIndexerindexSite in interface SiteIndexersiteName - the name of the site to index.IndexingException - If an error occurs while indexing the site.public void indexSite(String siteName, String workspaceName) throws IndexingException
SiteIndexerindexSite in interface SiteIndexersiteName - the name of the site to index.workspaceName - The workspace name.IndexingException - If an error occurs while indexing the site.public void indexSite(String siteName, String workspaceName, SolrClient solrClient) throws IndexingException
SiteIndexerindexSite in interface SiteIndexersiteName - the name of the site to index.workspaceName - The workspace name.solrClient - The solr client to useIndexingException - If an error occurs while indexing the site.private void _indexSite(String siteName, String workspaceName, SolrClient solrClient, boolean commitAndOptimize) throws IndexingException
IndexingExceptionpublic void indexSitemap(Sitemap sitemap) throws IndexingException
SiteIndexerindexSitemap in interface SiteIndexersitemap - the sitemap to index.IndexingException - If an error occurs while indexing the sitemap.public void indexSitemap(String siteName, String sitemapName) throws IndexingException
SiteIndexerindexSitemap in interface SiteIndexersiteName - the site name.sitemapName - the name of the sitemap to index.IndexingException - If an error occurs while indexing the sitemap.public void indexSitemap(String siteName, String sitemapName, String workspaceName) throws IndexingException
SiteIndexerindexSitemap in interface SiteIndexersiteName - the site name.sitemapName - the name of the sitemap to index.workspaceName - The workspace name.IndexingException - If an error occurs while indexing the sitemap.public void unindexSite(String siteName) throws IndexingException
SiteIndexerunindexSite in interface SiteIndexersiteName - the name of site to unindex.IndexingException - If an error occurs while unindexing the site.public void unindexSite(String siteName, String workspaceName) throws IndexingException
SiteIndexerunindexSite in interface SiteIndexersiteName - the name of site to unindex.workspaceName - The workspace name.IndexingException - If an error occurs while unindexing the site.public void unindexSitemap(String siteName, String sitemapName) throws IndexingException
SiteIndexerunindexSitemap in interface SiteIndexersiteName - the site name.sitemapName - the name of the sitemap to index.IndexingException - If an error occurs while unindexing the sitemap.public void unindexSitemap(String siteName, String sitemapName, String workspaceName) throws IndexingException
SiteIndexerunindexSitemap in interface SiteIndexersiteName - the site name.sitemapName - the name of the sitemap to index.workspaceName - The workspace name.IndexingException - If an error occurs while unindexing the sitemap.private void _indexSitemaps(Site site, String workspaceName, SolrClient solrClient) throws Exception
Exceptionprivate void _indexSitemap(String siteName, String sitemapName, String workspaceName, SolrClient solrClient) throws Exception
Exceptionprivate void _unindexSiteDocuments(String siteName, String workspaceName, SolrClient solrClient) throws SolrServerException, IOException
SolrServerExceptionIOExceptionprivate void _unindexSitemapDocuments(String siteName, String sitemapName, String workspace, SolrClient solrClient) throws SolrServerException, IOException
SolrServerExceptionIOExceptionprotected void _indexContents(Site site, String workspaceName, SolrClient solrClient) throws Exception
site - The site to index.workspaceName - The workspace namesolrClient - The solr client to useException - If an error occurs indexing the contents.protected void _indexResources(Site site, String workspaceName, SolrClient solrClient) throws Exception
site - The site to index.workspaceName - The workspace namesolrClient - The solr client to useException - If an error occurs indexing the resources.