|
||||||
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
Implementation for an indexer indexing VFS Cms resources.
Constructor Summary | |
---|---|
CmsVfsIndexer()
|
Method Summary | |
---|---|
void |
deleteResources(org.apache.lucene.index.IndexReader reader,
java.util.List resourcesToDelete)
Incremental index update - delete the index entry for all resources in the given list. |
CmsSearchIndexUpdateData |
getUpdateData(CmsSearchIndexSource source,
java.util.List 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 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 |
Constructor Detail |
---|
public CmsVfsIndexer()
Method Detail |
---|
public void deleteResources(org.apache.lucene.index.IndexReader reader, java.util.List resourcesToDelete)
I_CmsIndexer
deleteResources
in interface I_CmsIndexer
reader
- the index reader to delete the entries fromresourcesToDelete
- a list of CmsPublishedResource
instances that must be deletedI_CmsIndexer.deleteResources(org.apache.lucene.index.IndexReader, java.util.List)
public CmsSearchIndexUpdateData getUpdateData(CmsSearchIndexSource source, java.util.List publishedResources)
I_CmsIndexer
getUpdateData
in interface I_CmsIndexer
source
- 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_CmsIndexer
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 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_CmsIndexer
This is used when the index is fully rebuild, not for updating only some parts of an existing index.
rebuildIndex
in interface I_CmsIndexer
writer
- 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 resourcesToUpdate) throws CmsIndexException
I_CmsIndexer
updateResources
in interface I_CmsIndexer
writer
- 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 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 |