public abstract class AbstractBatchIndexer extends Object implements BatchIndexer
BatchIndexers. Basically sub-classes only need to provide the processing of each of the files to be indexed.| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
excludePathPatterns |
protected List<String> |
includePathPatterns |
| Constructor and Description |
|---|
AbstractBatchIndexer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doSingleFileUpdate(org.craftercms.search.service.SearchService searchService,
String indexId,
String siteName,
org.craftercms.core.service.ContentStoreService contentStoreService,
org.craftercms.core.service.Context context,
String path,
boolean delete,
UpdateStatus updateStatus) |
protected boolean |
include(String path) |
void |
setExcludePathPatterns(List<String> excludePathPatterns) |
void |
setIncludePathPatterns(List<String> includePathPatterns) |
void |
updateIndex(org.craftercms.search.service.SearchService searchService,
String indexId,
String siteName,
org.craftercms.core.service.ContentStoreService contentStoreService,
org.craftercms.core.service.Context context,
UpdateSet updateSet,
UpdateStatus updateStatus)
Updates the specified search index with the given batch of files.
|
public void updateIndex(org.craftercms.search.service.SearchService searchService,
String indexId,
String siteName,
org.craftercms.core.service.ContentStoreService contentStoreService,
org.craftercms.core.service.Context context,
UpdateSet updateSet,
UpdateStatus updateStatus)
throws BatchIndexingException
BatchIndexerupdateIndex in interface BatchIndexersearchService - the search service to useindexId - the ID of the index, or null to use a default indexsiteName - the name of the site the files belong tocontentStoreService - the content store service used to retrieve the files and content to indexcontext - the context of the file store being usedupdateSet - the set of files to update/deleteupdateStatus - status object used to track index updates and deletesBatchIndexingExceptionprotected boolean include(String path)
protected abstract void doSingleFileUpdate(org.craftercms.search.service.SearchService searchService,
String indexId,
String siteName,
org.craftercms.core.service.ContentStoreService contentStoreService,
org.craftercms.core.service.Context context,
String path,
boolean delete,
UpdateStatus updateStatus)
throws Exception
ExceptionCopyright © 2018 CrafterCMS. All rights reserved.