public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<org.alfresco.service.cmr.repository.NodeRef> implements ADMLuceneIndexer
AbstractLuceneIndexerImpl.Action, AbstractLuceneIndexerImpl.Command<S>, AbstractLuceneIndexerImpl.FTSStatus, AbstractLuceneIndexerImpl.IndexUpdateStatus
bulkLoader, commandList, containerDeletions, deletions, docs, indexUpdateStatus, maxAtomicTransformationTime, NOT_INDEXED_CONTENT_MISSING, NOT_INDEXED_NO_TRANSFORMATION, NOT_INDEXED_NO_TYPE_CONVERSION, NOT_INDEXED_TRANSFORMATION_FAILED, transactionService
deltaId, store
Modifier and Type | Method and Description |
---|---|
void |
createChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Create a refernce link between a parent and child.
|
List<org.apache.lucene.document.Document> |
createDocuments(String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments,
boolean cascade,
Set<org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.Pair<Boolean,org.alfresco.service.cmr.repository.Path>> pathsToRegenerate,
Map<org.alfresco.service.cmr.repository.NodeRef,List<org.alfresco.service.cmr.repository.ChildAssociationRef>> childAssociationsSinceFlush,
org.apache.lucene.index.IndexReader deltaReader,
org.apache.lucene.index.IndexReader mainReader) |
void |
createNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Create an index entry when a new node is created.
|
void |
deleteChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Delete a relationship between a parent and child.
|
protected Set<String> |
deleteImpl(String nodeRef,
org.apache.lucene.index.IndexReader deltaReader,
org.apache.lucene.index.IndexReader mainReader) |
void |
deleteIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
Delete the index for a store
|
protected boolean |
deleteLeafOnly(String nodeRef,
org.apache.lucene.index.IndexReader reader,
boolean delete) |
void |
deleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Delete a node entry from an index.
|
void |
detectNodeChanges(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.search.SearchService searcher,
Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> addedParents,
Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> deletedParents,
Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> createdNodes,
Collection<org.alfresco.service.cmr.repository.NodeRef> updatedNodes)
Does a database vs index comparison for the given created/updated/renamed/referenced nodeRef in order to
determine the set of indexing operations required
|
protected void |
doCommit() |
protected void |
doPrepare() |
protected void |
doRollBack() |
protected void |
doSetRollbackOnly() |
void |
flushPending() |
boolean |
getDeleteOnlyNodes()
Are we deleting leaves only (not meta data)
|
static ADMLuceneNoActionIndexerImpl |
getNoActionIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef,
String deltaId,
LuceneConfig config) |
static ADMLuceneIndexerImpl |
getUpdateIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef,
String deltaId,
LuceneConfig config)
Generate an indexer
|
protected boolean |
indexProperty(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyName,
Serializable value,
org.apache.lucene.document.Document doc,
boolean indexAtomicPropertiesOnly,
boolean isContentIndexedForNode) |
protected List<org.apache.lucene.document.Document> |
readDocuments(String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments,
boolean cascade,
Set<org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.Pair<Boolean,org.alfresco.service.cmr.repository.Path>> pathsToRegenerate,
Map<org.alfresco.service.cmr.repository.NodeRef,List<org.alfresco.service.cmr.repository.ChildAssociationRef>> childAssociationsSinceFlush,
org.apache.lucene.index.IndexReader deltaReader,
org.apache.lucene.index.IndexReader mainReader) |
void |
registerCallBack(FTSIndexerAware callBack)
Register call back handler when the indexing chunk is done
|
void |
setAspectIndexFilter(AspectIndexFilter aspectIndexFilter)
Setter of the aspectIndexFilter
|
void |
setContentService(ContentService contentService)
IOC setting of the content service
|
void |
setFullTextSearchIndexer(FullTextSearchIndexer fullTextSearchIndexer)
Set the back ground indexer manager
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
IOC setting of the node service
|
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
IOC setting of the tenant service
|
void |
setTransformerDebug(TransformerDebug transformerDebug)
Setter of the transformer debug.
|
void |
setTypeIndexFilter(TypeIndexFilter typeIndexFilter)
Setter of the typeIndexFilter
|
void |
updateChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipBeforeRef,
org.alfresco.service.cmr.repository.ChildAssociationRef relationshipAfterRef)
Alter the relationship between parent and child nodes in the index.
|
int |
updateFullTextSearch(int size)
Peform a chunk of background FTS (and other non atomic property) indexing
|
void |
updateNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Update an index entry due to property changes on a node.
|
checkAbleToDoWork, commit, delete, deleteContainerAndBelow, deletePrimary, deleteReference, doInReadthroughTransaction, getContainerDeletions, getDeletions, index, isModified, locateContainer, prepare, reindex, rollback, setBulkLoader, setMaxAtomicTransformationTime, setReadThrough, setRollbackOnly, setTransactionService
closeDeltaReader, closeDeltaWriter, deleteIndex, doReadOnly, getDeltaId, getDeltaReader, getDeltaWriter, getDictionaryService, getLuceneConfig, getReader, getSearcher, getSearcher, getStatus, initialise, saveDelta, setDictionaryService, setInfo, setLuceneConfig, setStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doReadOnly, getContainerDeletions, getDeletions, getDeltaId
setReadThrough
commit, isModified, prepare, rollback
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- NodeServicepublic void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
tenantService
- TenantServicepublic void setContentService(ContentService contentService)
contentService
- ContentServicepublic void setTransformerDebug(TransformerDebug transformerDebug)
transformerDebug
- TransformerDebugpublic void setTypeIndexFilter(TypeIndexFilter typeIndexFilter)
typeIndexFilter
- public void setAspectIndexFilter(AspectIndexFilter aspectIndexFilter)
aspectIndexFilter
- public void createNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef) throws LuceneIndexException
Indexer
createNode
in interface Indexer
relationshipRef
- ChildAssociationRefLuceneIndexException
public void updateNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws LuceneIndexException
Indexer
updateNode
in interface Indexer
nodeRef
- NodeRefLuceneIndexException
public void deleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef) throws LuceneIndexException
Indexer
deleteNode
in interface Indexer
relationshipRef
- ChildAssociationRefLuceneIndexException
public void createChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef) throws LuceneIndexException
Indexer
createChildRelationship
in interface Indexer
relationshipRef
- ChildAssociationRefLuceneIndexException
public void updateChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipBeforeRef, org.alfresco.service.cmr.repository.ChildAssociationRef relationshipAfterRef) throws LuceneIndexException
Indexer
updateChildRelationship
in interface Indexer
relationshipBeforeRef
- ChildAssociationRefrelationshipAfterRef
- ChildAssociationRefLuceneIndexException
public void deleteChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef) throws LuceneIndexException
Indexer
deleteChildRelationship
in interface Indexer
relationshipRef
- ChildAssociationRefLuceneIndexException
public boolean getDeleteOnlyNodes()
getDeleteOnlyNodes
in interface LuceneIndexer
public static ADMLuceneIndexerImpl getUpdateIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef, String deltaId, LuceneConfig config) throws LuceneIndexException
storeRef
- StoreRefdeltaId
- Stringconfig
- LuceneConfigLuceneIndexException
public static ADMLuceneNoActionIndexerImpl getNoActionIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef, String deltaId, LuceneConfig config) throws LuceneIndexException
LuceneIndexException
protected boolean deleteLeafOnly(String nodeRef, org.apache.lucene.index.IndexReader reader, boolean delete) throws LuceneIndexException
LuceneIndexException
protected Set<String> deleteImpl(String nodeRef, org.apache.lucene.index.IndexReader deltaReader, org.apache.lucene.index.IndexReader mainReader) throws LuceneIndexException, IOException
LuceneIndexException
IOException
public List<org.apache.lucene.document.Document> createDocuments(String stringNodeRef, AbstractLuceneIndexerImpl.FTSStatus ftsStatus, boolean indexAllProperties, boolean includeDirectoryDocuments, boolean cascade, Set<org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.Pair<Boolean,org.alfresco.service.cmr.repository.Path>> pathsToRegenerate, Map<org.alfresco.service.cmr.repository.NodeRef,List<org.alfresco.service.cmr.repository.ChildAssociationRef>> childAssociationsSinceFlush, org.apache.lucene.index.IndexReader deltaReader, org.apache.lucene.index.IndexReader mainReader)
public void detectNodeChanges(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.search.SearchService searcher, Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> addedParents, Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> deletedParents, Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> createdNodes, Collection<org.alfresco.service.cmr.repository.NodeRef> updatedNodes) throws LuceneIndexException
Indexer
detectNodeChanges
in interface Indexer
nodeRef
- the nodeRef to processsearcher
- searcher to query the indexesaddedParents
- set to add new secondary parent associations todeletedParents
- set to add removed secondary parent associations tocreatedNodes
- set to add created nodes toupdatedNodes
- set to add updated nodes toLuceneIndexException
public void flushPending() throws LuceneIndexException
flushPending
in interface Indexer
LuceneIndexException
protected boolean indexProperty(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName propertyName, Serializable value, org.apache.lucene.document.Document doc, boolean indexAtomicPropertiesOnly, boolean isContentIndexedForNode)
indexAtomicPropertiesOnly
- true to ignore all properties that must be indexed non-atomicallypublic int updateFullTextSearch(int size) throws LuceneIndexException
BackgroundIndexerAware
updateFullTextSearch
in interface BackgroundIndexerAware
size
- intLuceneIndexException
protected List<org.apache.lucene.document.Document> readDocuments(String stringNodeRef, AbstractLuceneIndexerImpl.FTSStatus ftsStatus, boolean indexAllProperties, boolean includeDirectoryDocuments, boolean cascade, Set<org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.Pair<Boolean,org.alfresco.service.cmr.repository.Path>> pathsToRegenerate, Map<org.alfresco.service.cmr.repository.NodeRef,List<org.alfresco.service.cmr.repository.ChildAssociationRef>> childAssociationsSinceFlush, org.apache.lucene.index.IndexReader deltaReader, org.apache.lucene.index.IndexReader mainReader)
public void registerCallBack(FTSIndexerAware callBack)
BackgroundIndexerAware
registerCallBack
in interface BackgroundIndexerAware
callBack
- FTSIndexerAwarepublic void setFullTextSearchIndexer(FullTextSearchIndexer fullTextSearchIndexer)
SupportsBackgroundIndexing
setFullTextSearchIndexer
in interface SupportsBackgroundIndexing
fullTextSearchIndexer
- FullTextSearchIndexerprotected void doPrepare() throws IOException
doPrepare
in class AbstractLuceneIndexerImpl<org.alfresco.service.cmr.repository.NodeRef>
IOException
protected void doCommit() throws IOException
doCommit
in class AbstractLuceneIndexerImpl<org.alfresco.service.cmr.repository.NodeRef>
IOException
protected void doRollBack() throws IOException
doRollBack
in class AbstractLuceneIndexerImpl<org.alfresco.service.cmr.repository.NodeRef>
IOException
protected void doSetRollbackOnly() throws IOException
doSetRollbackOnly
in class AbstractLuceneIndexerImpl<org.alfresco.service.cmr.repository.NodeRef>
IOException
public void deleteIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
Indexer
deleteIndex
in interface Indexer
storeRef
- StoreRefCopyright © 2005–2017 Alfresco Software. All rights reserved.