|
||||||||||
| 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(IndexReader reader,
List resourcesToDelete)
Incremental index update - delete the index entry for all resources in the given list. |
A_CmsIndexResource |
getIndexResource(CmsObject cms,
Document doc)
Returns an index resource for a specified Lucene search result document. |
CmsSearchIndexUpdateData |
getUpdateData(CmsSearchIndexSource source,
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(IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsSearchIndexSource source)
Rebuilds the index for the given configured index source. |
protected void |
updateResource(IndexWriter writer,
CmsIndexingThreadManager threadManager,
CmsResource resource)
Updates (writes) a single resource in the index. |
void |
updateResources(IndexWriter writer,
CmsIndexingThreadManager threadManager,
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(IndexReader reader,
List resourcesToDelete)
I_CmsIndexer
deleteResources in interface I_CmsIndexerreader - 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 A_CmsIndexResource getIndexResource(CmsObject cms,
Document doc)
throws CmsException
I_CmsIndexerImplementations of this method have to check if the current user has read permissions on the Cms resource represented by the Lucene document.
If this check fails, the implementation must return null as a result.
getIndexResource in interface I_CmsIndexercms - the OpenCms context to use when reading resources from the VFSdoc - the Lucene search result document
CmsException - if something goes wrongI_CmsIndexer.getIndexResource(org.opencms.file.CmsObject, org.apache.lucene.document.Document)
public CmsSearchIndexUpdateData getUpdateData(CmsSearchIndexSource source,
List 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(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(IndexWriter writer,
CmsIndexingThreadManager threadManager,
List 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 boolean isResourceInTimeWindow(CmsPublishedResource resource)
resource - the published resource to check
protected void updateResource(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 | |||||||||