Package com.atlassian.jira.sharing.index
Class DefaultSharedEntityIndexer
java.lang.Object
com.atlassian.jira.sharing.index.DefaultSharedEntityIndexer
- All Implemented Interfaces:
SharedEntityIndexer
default implementation
- Since:
- v3.13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceHolds aDocumentand an identifyingTermso we can delete any pre-existing document.static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Index.Managerused only when closing and shutting down so we don't create stray index directories -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSharedEntityIndexer(ShareTypeFactory shareTypeFactory, SharedEntitySearchContextToQueryFactoryMap searchContextToQueryFactoryMap, SharedEntityAccessor.Factory accessorFactory, DirectoryFactory directoryFactory, UserManager userManager, ReplicatedIndexManager replicatedIndexManager, ApplicationProperties applicationProperties, IndexBackupContributionStrategy backupPreparationStrategy) -
Method Summary
Modifier and TypeMethodDescriptionclear(SharedEntity.TypeDescriptor<?> type) Clear a particular type's index.voidcontributeToSnapshot(SharedEntity.TypeDescriptor<? extends SharedEntity> entityType, BackupBuilder backupBuilder) Contribute a set of files that represent shared entity index ofentityTypeto the givenbackupBuilderto include them in the backup being created when this method was called.deIndex(SharedEntity entity) Delete a document from the index.deIndex(Set<SharedEntity> sharedEntities, boolean shouldReplicate) Delete multiple documents in the indexindex(SharedEntity entity) Add or update a document in the index.index(SharedEntity entity, boolean shouldReplicate) Add or update a document in the index.index(Set<SharedEntity> sharedEntities, boolean shouldReplicate) Add or update multiple documents in the indexlongoptimize(SharedEntity.TypeDescriptor<?> type) Optimize a particular type's index.voidrecreate(SharedEntity.TypeDescriptor<?> type) Recreate the index.voidshutdown(SharedEntity.TypeDescriptor<?> type) Shutdown a particular type's index.<S extends SharedEntity>
SharedEntitySearchResult<S>withSearcher(SharedEntity.TypeDescriptor<S> type, Function<SharedEntitySearcher<S>, SharedEntitySearchResult<S>> searcherOperation)
-
Field Details
-
NULL_MANAGER
used only when closing and shutting down so we don't create stray index directories
-
-
Constructor Details
-
Method Details
-
index
Description copied from interface:SharedEntityIndexerAdd or update multiple documents in the index- Specified by:
indexin interfaceSharedEntityIndexer- Parameters:
sharedEntities- a Set of entities to add to the indexshouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndex
Description copied from interface:SharedEntityIndexerDelete multiple documents in the index- Specified by:
deIndexin interfaceSharedEntityIndexer- Parameters:
sharedEntities- a Set of entities to remove from the indexshouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
getAllIndexPaths
- Specified by:
getAllIndexPathsin interfaceSharedEntityIndexer- Returns:
- all the paths where the indexes are