Package com.atlassian.jira.sharing.index
Interface SharedEntityIndexer
- All Known Implementing Classes:
DefaultSharedEntityIndexer,MockSharedEntityIndexer
public interface SharedEntityIndexer
Responsible for actually indexing a
SharedEntity.- Since:
- v3.13
-
Method Summary
Modifier and TypeMethodDescriptionclear(SharedEntity.TypeDescriptor<?> type) Clear a particular type's index.default 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)
-
Method Details
-
index
Add or update multiple documents in the index- 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.- Since:
- v6.1
-
deIndex
Delete multiple documents in the index- 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.- Since:
- v6.1
-
getAllIndexPaths
Collection<String> getAllIndexPaths()- Returns:
- all the paths where the indexes are