java.lang .Object org.sakaiproject.search.component.service.impl .SearchIndexBuilderImpl SearchIndexBuilderImpl public class SearchIndexBuilderImpl implements SearchIndexBuilder (Code) Search index builder is expected to be registered in spring as org.sakaiproject.search.api.SearchIndexBuilder as a singleton. It receives resources which it adds to its list of pending documents to be indexed. A seperate thread then runs thtough the
list of entities to be indexed, updating the index. Each time the index is updates an event is posted to force the Search components that are using the index to reload. Incremental updates to the Lucene index require that the searchers reload the index
once the idex writer has been built.
author: ieb
addResource public void addResource(Notification notification, Event event)(Code) Add a resource to the indexing queue
destroy public void destroy()(Code)
disableDiagnostics public void disableDiagnostics()(Code)
enableDiagnostics public void enableDiagnostics()(Code)
getAllSearchItems public List getAllSearchItems()(Code)
getContentProducers public List getContentProducers()(Code) get all the producers registerd, as a clone to avoid concurrent modification exceptions
getGlobalMasterSearchItems public List getGlobalMasterSearchItems()(Code)
getPendingDocuments public int getPendingDocuments()(Code)
getSiteMasterSearchItems public List getSiteMasterSearchItems()(Code)
hasDiagnostics public boolean hasDiagnostics()(Code)
isBuildQueueEmpty public boolean isBuildQueueEmpty()(Code) return true if the queue is empty
isLocalLock public boolean isLocalLock()(Code)
isOnlyIndexSearchToolSites public boolean isOnlyIndexSearchToolSites()(Code) the onlyIndexSearchToolSites
newEntityContentProducer public EntityContentProducer newEntityContentProducer(Event event)(Code) get hold of an entity content producer using the event
Parameters: event -
rebuildIndex public void rebuildIndex()(Code) Rebuild the index from the entities own stored state
rebuildIndex public void rebuildIndex(String currentSiteId)(Code) Rebuild the index from the entities own stored state
, just the supplied siteId
refreshIndex public void refreshIndex()(Code) refresh the index from the current stored state
refreshIndex public void refreshIndex(String currentSiteId)(Code) Refresh the index fo the supplied site.
registerEntityContentProducer public void registerEntityContentProducer(EntityContentProducer ecp)(Code) register an entity content producer to provide content to the search engine
removeWorkerLock public boolean removeWorkerLock()(Code)
setOnlyIndexSearchToolSites public void setOnlyIndexSearchToolSites(boolean onlyIndexSearchToolSites)(Code) Parameters: onlyIndexSearchToolSites - the onlyIndexSearchToolSites to set
setSearchBuilderItemDao public void setSearchBuilderItemDao(SearchBuilderItemDao searchBuilderItemDao)(Code) Parameters: searchBuilderItemDao - The searchBuilderItemDao to set.