|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.search.impl.lucene.AbstractLuceneBase
org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl
org.alfresco.repo.search.impl.lucene.AVMLuceneIndexerImpl
public class AVMLuceneIndexerImpl
Update the index after a snap shot to an AVM store. (Revert is dealt with as a new snap shot is created)
| Nested Class Summary | |
|---|---|
protected static class |
AVMLuceneIndexerImpl.IndexDeleteMode
|
| Nested classes/interfaces inherited from class org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl |
|---|
AbstractLuceneIndexerImpl.Action, AbstractLuceneIndexerImpl.Command, AbstractLuceneIndexerImpl.FTSStatus, AbstractLuceneIndexerImpl.IndexUpdateStatus |
| Field Summary | |
|---|---|
protected java.util.Set |
deletionsSinceFlush
A list of deletions associated with the changes to nodes in the current flush |
| Fields inherited from class org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl |
|---|
commandList, containerDeletions, deletions, docs, indexUpdateStatus, maxAtomicTransformationTime, NOT_INDEXED_CONTENT_MISSING, NOT_INDEXED_NO_TRANSFORMATION, NOT_INDEXED_NO_TYPE_CONVERSION, NOT_INDEXED_TRANSFORMATION_FAILED, transactionService |
| Fields inherited from class org.alfresco.repo.search.impl.lucene.AbstractLuceneBase |
|---|
deltaId, store |
| Constructor Summary | |
|---|---|
AVMLuceneIndexerImpl()
|
|
| Method Summary | |
|---|---|
void |
asyncronousCreateIndex(java.lang.String store)
Asyn create index |
void |
asyncronousDeleteIndex(java.lang.String store)
Support to delete all entries frmo the idnex in the background |
void |
createChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Create a refernce link between a parent and child. |
protected java.util.List |
createDocuments(java.lang.String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments)
|
void |
createIndex(java.lang.String store,
IndexMode mode)
Create an index for the specified store. |
void |
createNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Create an index entry when a new node is created. |
void |
deleteAll()
Delete all entries from the index. |
void |
deleteAll(java.lang.String prefix)
Delete all index entries which do not start with the given prefix |
void |
deleteChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Delete a relationship between a parent and child. |
protected java.util.Set |
deleteImpl(java.lang.String nodeRef,
AVMLuceneIndexerImpl.IndexDeleteMode mode,
boolean cascade,
org.apache.lucene.index.IndexReader mainReader)
|
void |
deleteIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
Delete the index for a store |
void |
deleteIndex(java.lang.String store,
IndexMode mode)
Delete the index for the specified store. |
void |
deleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Delete a node entry from an index. |
protected void |
doCommit()
|
protected void |
doPrepare()
|
protected void |
doRollBack()
|
protected void |
doSetRollbackOnly()
|
void |
flushPending()
|
boolean |
getDeleteOnlyNodes()
Are we deleting leaves only (not meta data) |
long |
getIndexedDocCount()
Get the number of docs this indexer has indexed so far |
int |
getLastIndexedSnapshot(java.lang.String store)
Get the last snapshot in the index - this does not mean that all snapshots before it have been indexed. |
static AVMLuceneIndexerImpl |
getUpdateIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.String deltaId,
LuceneConfig config)
Generate an indexer |
boolean |
hasIndexBeenCreated(java.lang.String store)
Has the index been ceated |
boolean |
hasIndexBeenCreatedimpl(java.lang.String store,
org.alfresco.repo.search.impl.lucene.AVMLuceneIndexerImpl.IndexChannel channel)
|
void |
index(java.lang.String store,
int srcVersion,
int dstVersion,
IndexMode mode)
Index a specified change to a store |
protected void |
indexImpl(java.lang.String nodeRef,
boolean isNew)
|
protected boolean |
indexProperty(org.alfresco.service.cmr.repository.NodeRef banana,
org.alfresco.service.namespace.QName propertyName,
java.io.Serializable value,
org.apache.lucene.document.Document doc,
boolean indexAtomicPropertiesOnly,
java.util.Map properties,
boolean isContentIndexedForNode)
|
boolean |
isSnapshotIndexed(java.lang.String store,
int id)
Is the snapshot applied to the index? Is there an entry for any node that was added OR have all the nodes in the transaction been deleted as expected? |
boolean |
isSnapshotSearchable(java.lang.String store,
int id)
Is snapshot searchable |
protected java.io.Serializable |
makeSerializableValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
PropertyValue propertyValue)
|
protected java.util.List |
readDocuments(java.lang.String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments)
|
void |
registerCallBack(FTSIndexerAware callBack)
Register call back handler when the indexing chunk is done |
void |
setAvmService(AVMService avmService)
Set the AVM Service |
void |
setAvmSyncService(AVMSyncService avmSyncService)
Set the AVM sync service |
void |
setContentService(ContentService contentService)
|
void |
setContentStore(ContentStore contentStore)
Set the content service |
void |
setFullTextSearchIndexer(FullTextSearchIndexer fullTextSearchIndexer)
Set the back ground indexer manager |
void |
syncronousCreateIndex(java.lang.String store)
Sync create index |
void |
syncronousDeleteIndex(java.lang.String store)
Sync delete of this index |
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. |
| Methods inherited from class org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl |
|---|
checkAbleToDoWork, commit, delete, deleteContainerAndBelow, deleteLeafOnly, deletePrimary, deleteReference, doInReadthroughTransaction, getContainerDeletions, getDeletions, index, isModified, locateContainer, prepare, reindex, rollback, setMaxAtomicTransformationTime, setReadThrough, setRollbackOnly, setTransactionService |
| Methods inherited from class org.alfresco.repo.search.impl.lucene.AbstractLuceneBase |
|---|
closeDeltaReader, closeDeltaWriter, deleteIndex, doReadOnly, getDeltaId, getDeltaReader, getDeltaWriter, getDictionaryService, getLuceneConfig, getReader, getSearcher, getSearcher, getStatus, initialise, saveDelta, setDictionaryService, setInfo, setLuceneConfig, setStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.alfresco.repo.search.impl.lucene.LuceneIndexer |
|---|
doReadOnly, getContainerDeletions, getDeletions, getDeltaId |
| Methods inherited from interface org.alfresco.repo.search.Indexer |
|---|
setReadThrough |
| Methods inherited from interface org.alfresco.repo.search.TransactionSynchronisationAwareIndexer |
|---|
commit, isModified, prepare, rollback |
| Field Detail |
|---|
protected java.util.Set deletionsSinceFlush
| Constructor Detail |
|---|
public AVMLuceneIndexerImpl()
| Method Detail |
|---|
public void setAvmService(AVMService avmService)
avmService - public void setAvmSyncService(AVMSyncService avmSyncService)
avmSyncService - public void setContentStore(ContentStore contentStore)
contentStore - public void setContentService(ContentService contentService)
contentService - public boolean getDeleteOnlyNodes()
getDeleteOnlyNodes in interface LuceneIndexer
public static AVMLuceneIndexerImpl getUpdateIndexer(org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.String deltaId,
LuceneConfig config)
throws LuceneIndexException
storeRef - deltaId - config -
LuceneIndexException
public void index(java.lang.String store,
int srcVersion,
int dstVersion,
IndexMode mode)
index in interface AVMLuceneIndexerstore - srcVersion - dstVersion -
protected java.util.Set deleteImpl(java.lang.String nodeRef,
AVMLuceneIndexerImpl.IndexDeleteMode mode,
boolean cascade,
org.apache.lucene.index.IndexReader mainReader)
throws LuceneIndexException,
java.io.IOException
LuceneIndexException
java.io.IOException
protected java.util.List createDocuments(java.lang.String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments)
protected java.util.List readDocuments(java.lang.String stringNodeRef,
AbstractLuceneIndexerImpl.FTSStatus ftsStatus,
boolean indexAllProperties,
boolean includeDirectoryDocuments)
protected void indexImpl(java.lang.String nodeRef,
boolean isNew)
throws LuceneIndexException,
java.io.IOException
LuceneIndexException
java.io.IOException
public void flushPending()
throws LuceneIndexException
flushPending in interface IndexerLuceneIndexException
protected java.io.Serializable makeSerializableValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
PropertyValue propertyValue)
protected boolean indexProperty(org.alfresco.service.cmr.repository.NodeRef banana,
org.alfresco.service.namespace.QName propertyName,
java.io.Serializable value,
org.apache.lucene.document.Document doc,
boolean indexAtomicPropertiesOnly,
java.util.Map properties,
boolean isContentIndexedForNode)
protected void doPrepare()
throws java.io.IOException
doPrepare in class AbstractLuceneIndexerImpljava.io.IOException
protected void doCommit()
throws java.io.IOException
doCommit in class AbstractLuceneIndexerImpljava.io.IOException
protected void doRollBack()
throws java.io.IOException
doRollBack in class AbstractLuceneIndexerImpljava.io.IOException
protected void doSetRollbackOnly()
throws java.io.IOException
doSetRollbackOnly in class AbstractLuceneIndexerImpljava.io.IOExceptionpublic void createNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Indexer
createNode in interface Indexerpublic void updateNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indexer
updateNode in interface Indexerpublic void deleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Indexer
deleteNode in interface Indexerpublic void createChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Indexer
createChildRelationship in interface Indexer
public void updateChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipBeforeRef,
org.alfresco.service.cmr.repository.ChildAssociationRef relationshipAfterRef)
Indexer
updateChildRelationship in interface Indexerpublic void deleteChildRelationship(org.alfresco.service.cmr.repository.ChildAssociationRef relationshipRef)
Indexer
deleteChildRelationship in interface Indexer
public void deleteIndex(java.lang.String store,
IndexMode mode)
AVMLuceneIndexer
deleteIndex in interface AVMLuceneIndexerpublic void syncronousDeleteIndex(java.lang.String store)
store - public void asyncronousDeleteIndex(java.lang.String store)
store -
public void createIndex(java.lang.String store,
IndexMode mode)
AVMLuceneIndexer
createIndex in interface AVMLuceneIndexerpublic void syncronousCreateIndex(java.lang.String store)
store - public void asyncronousCreateIndex(java.lang.String store)
store - public void registerCallBack(FTSIndexerAware callBack)
BackgroundIndexerAware
registerCallBack in interface BackgroundIndexerAwarepublic int updateFullTextSearch(int size)
BackgroundIndexerAware
updateFullTextSearch in interface BackgroundIndexerAwarepublic void setFullTextSearchIndexer(FullTextSearchIndexer fullTextSearchIndexer)
SupportsBackgroundIndexing
setFullTextSearchIndexer in interface SupportsBackgroundIndexing
public boolean isSnapshotIndexed(java.lang.String store,
int id)
AVMLuceneIndexer
isSnapshotIndexed in interface AVMLuceneIndexer
public boolean isSnapshotSearchable(java.lang.String store,
int id)
AVMLuceneIndexer
isSnapshotSearchable in interface AVMLuceneIndexerpublic boolean hasIndexBeenCreated(java.lang.String store)
AVMLuceneIndexer
hasIndexBeenCreated in interface AVMLuceneIndexer
public boolean hasIndexBeenCreatedimpl(java.lang.String store,
org.alfresco.repo.search.impl.lucene.AVMLuceneIndexerImpl.IndexChannel channel)
public long getIndexedDocCount()
AVMLuceneIndexer
getIndexedDocCount in interface AVMLuceneIndexerpublic int getLastIndexedSnapshot(java.lang.String store)
AVMLuceneIndexer
getLastIndexedSnapshot in interface AVMLuceneIndexerpublic void deleteIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
Indexer
deleteIndex in interface Indexerpublic void deleteAll()
public void deleteAll(java.lang.String prefix)
prefix -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||