public interface I_CmsIndexer
This is a high level interface that abstracts the index generation process from the search index itself. Implement this in case special handling of the index generation process is required.
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deleteResources(I_CmsIndexWriter indexWriter,
java.util.List<CmsPublishedResource> resourcesToDelete)
Incremental index update - delete the index entry for all resources in the given list.
|
CmsSearchIndexUpdateData |
getUpdateData(CmsSearchIndexSource source,
java.util.List<CmsPublishedResource> publishedResources)
Calculates the data for an incremental search index update.
|
boolean |
isLocaleDependenciesEnable()
Returns
true if this VFS indexer is able to resolve locale dependencies between documents. |
I_CmsIndexer |
newInstance(CmsObject cms,
I_CmsReport report,
CmsSearchIndex index)
Creates and initializes a new instance of this indexer implementation.
|
void |
rebuildIndex(I_CmsIndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsSearchIndexSource source)
Rebuilds the index for the given configured index source.
|
void |
updateResources(I_CmsIndexWriter writer,
CmsIndexingThreadManager threadManager,
java.util.List<CmsPublishedResource> resourcesToUpdate)
Incremental index update - create a new index entry for all resources in the given list.
|
void deleteResources(I_CmsIndexWriter indexWriter, java.util.List<CmsPublishedResource> resourcesToDelete) throws CmsIndexException
indexWriter - the writer to the index to delete the entries fromresourcesToDelete - a list of CmsPublishedResource instances that must be deletedCmsIndexException - if something goes wrongCmsSearchIndexUpdateData getUpdateData(CmsSearchIndexSource source, java.util.List<CmsPublishedResource> publishedResources) throws CmsIndexException
source - the search index source to updatepublishedResources - a list of CmsPublishedResource objects that are to be updatedCmsIndexException - if something goes wrongboolean isLocaleDependenciesEnable()
true if this VFS indexer is able to resolve locale dependencies between documents.true if this VFS indexer is able to resolve locale dependencies between documentsI_CmsIndexer newInstance(CmsObject cms, I_CmsReport report, CmsSearchIndex index)
cms - the OpenCms user context to use when reading resources from the VFS during indexingreport - the report to write the indexing output toindex - the search index to updatevoid rebuildIndex(I_CmsIndexWriter writer, CmsIndexingThreadManager threadManager, CmsSearchIndexSource source) throws CmsIndexException
This is used when the index is fully rebuild, not for updating only some parts of an existing index.
writer - the index writer to write the update tosource - the search index source to updatethreadManager - the thread manager to use when extracting the document textCmsIndexException - if something goes wrongvoid updateResources(I_CmsIndexWriter writer, CmsIndexingThreadManager threadManager, java.util.List<CmsPublishedResource> resourcesToUpdate) throws CmsIndexException
writer - the index writer to write the update toresourcesToUpdate - a list of CmsPublishedResource instances that must be updatedthreadManager - the thread manager to use when extracting the document textCmsIndexException - if something goes wrong