|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.search.CmsVfsIndexer
public class CmsVfsIndexer
An indexer indexing CmsResource based content from the OpenCms VFS.
| Field Summary | |
|---|---|
protected CmsObject |
m_cms
The OpenCms user context to use when reading resources from the VFS during indexing. |
protected CmsSearchIndex |
m_index
The index. |
protected I_CmsReport |
m_report
The report. |
| Constructor Summary | |
|---|---|
CmsVfsIndexer()
|
|
| Method Summary | |
|---|---|
protected void |
addResourceToUpdateData(CmsPublishedResource pubRes,
CmsSearchIndexUpdateData updateData)
Adds a given published resource to the provided search index update data. |
protected void |
deleteResource(org.apache.lucene.index.IndexWriter indexWriter,
java.lang.String rootPath)
Deletes a single resource from the given index. |
void |
deleteResources(org.apache.lucene.index.IndexWriter 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. |
protected boolean |
isResourceInTimeWindow(CmsPublishedResource resource)
Checks if the published resource is inside the time window set with release and expiration date. |
I_CmsIndexer |
newInstance(CmsObject cms,
I_CmsReport report,
CmsSearchIndex index)
Creates and initializes a new instance of this indexer implementation. |
void |
rebuildIndex(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsSearchIndexSource source)
Rebuilds the index for the given configured index source. |
protected void |
updateResource(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsResource resource)
Updates (writes) a single resource in the index. |
void |
updateResources(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
java.util.List<CmsPublishedResource> resourcesToUpdate)
Incremental index update - create a new index entry for all resources in the given list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CmsObject m_cms
protected CmsSearchIndex m_index
protected I_CmsReport m_report
| Constructor Detail |
|---|
public CmsVfsIndexer()
| Method Detail |
|---|
public void deleteResources(org.apache.lucene.index.IndexWriter indexWriter,
java.util.List<CmsPublishedResource> resourcesToDelete)
I_CmsIndexer
deleteResources in interface I_CmsIndexerindexWriter - the writer to the index to delete the entries fromresourcesToDelete - a list of CmsPublishedResource instances that must be deletedI_CmsIndexer.deleteResources(org.apache.lucene.index.IndexWriter, java.util.List)
public CmsSearchIndexUpdateData getUpdateData(CmsSearchIndexSource source,
java.util.List<CmsPublishedResource> publishedResources)
I_CmsIndexer
getUpdateData in interface I_CmsIndexersource - the search index source to updatepublishedResources - a list of CmsPublishedResource objects that are to be updated
I_CmsIndexer.getUpdateData(org.opencms.search.CmsSearchIndexSource, java.util.List)
public I_CmsIndexer newInstance(CmsObject cms,
I_CmsReport report,
CmsSearchIndex index)
I_CmsIndexer
newInstance in interface I_CmsIndexercms - 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 update
I_CmsIndexer.newInstance(org.opencms.file.CmsObject, org.opencms.report.I_CmsReport, org.opencms.search.CmsSearchIndex)
public void rebuildIndex(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsSearchIndexSource source)
throws CmsIndexException
I_CmsIndexerThis is used when the index is fully rebuild, not for updating only some parts of an existing index.
rebuildIndex in interface I_CmsIndexerwriter - the index writer to write the update tothreadManager - the thread manager to use when extracting the document textsource - the search index source to update
CmsIndexException - if something goes wrongI_CmsIndexer.rebuildIndex(org.apache.lucene.index.IndexWriter, org.opencms.search.CmsIndexingThreadManager, org.opencms.search.CmsSearchIndexSource)
public void updateResources(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
java.util.List<CmsPublishedResource> resourcesToUpdate)
throws CmsIndexException
I_CmsIndexer
updateResources in interface I_CmsIndexerwriter - the index writer to write the update tothreadManager - the thread manager to use when extracting the document textresourcesToUpdate - a list of CmsPublishedResource instances that must be updated
CmsIndexException - if something goes wrongI_CmsIndexer.updateResources(org.apache.lucene.index.IndexWriter, org.opencms.search.CmsIndexingThreadManager, java.util.List)
protected void addResourceToUpdateData(CmsPublishedResource pubRes,
CmsSearchIndexUpdateData updateData)
This method decides if the resource has to be included in the "update" or "delete" list.
pubRes - the published resource to addupdateData - the search index update data to add the resource to
protected void deleteResource(org.apache.lucene.index.IndexWriter indexWriter,
java.lang.String rootPath)
indexWriter - the index to delete the resource fromrootPath - the root path of the resource to deleteprotected boolean isResourceInTimeWindow(CmsPublishedResource resource)
resource - the published resource to check
protected void updateResource(org.apache.lucene.index.IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsResource resource)
throws CmsIndexException
writer - the index writer to usethreadManager - the thread manager to use when extracting the document textresource - the resource to update
CmsIndexException - if something goes wrong
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||