Package com.atlassian.jira.issue.index
Class DefaultIssueIndexer
java.lang.Object
com.atlassian.jira.issue.index.DefaultIssueIndexer
- All Implemented Interfaces:
BackupContributor
,IssueIndexer
,UnmanagedIndexSearcherProvider
@Deprecated(since="10.4",
forRemoval=true)
public class DefaultIssueIndexer
extends Object
implements IssueIndexer
Deprecated, for removal: This API element is subject to removal in a future version.
A legacy implementation of
IssueIndexer
for Lucene-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Deprecated, for removal: This API element is subject to removal in a future version.static interface
Deprecated, for removal: This API element is subject to removal in a future version.class
Deprecated, for removal: This API element is subject to removal in a future version.static interface
DefaultIssueIndexer.EntityRetriever<T extends WithId>
Deprecated, for removal: This API element is subject to removal in a future version.static interface
Deprecated, for removal: This API element is subject to removal in a future version.Nested classes/interfaces inherited from interface com.atlassian.jira.issue.index.IssueIndexer
IssueIndexer.Analyzers
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIssueIndexer
(IndexDirectoryFactory indexDirectoryFactory, DefaultIssueIndexer.CommentRetriever commentRetriever, DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever, DefaultIssueIndexer.WorklogRetriever worklogRetriever, ApplicationProperties applicationProperties, IssueDocumentFactory issueDocumentFactory, CommentDocumentFactory commentDocumentFactory, ChangeHistoryDocumentFactory changeHistoryDocumentFactory, WorklogDocumentFactory worklogDocumentFactory, IssueManager issueManager, IndexBackupContributionStrategy backupPreparationStrategy, IndexBackupContributorsManager indexBackupContributorsManager, DBRSender dbrSender, EntityVersioningManager entityVersioningManager, ReplicatedIndexManager replicatedIndexManager, IndexingFeatures indexingFeatures, IndexingLimitsStats indexingLimitsStats, com.atlassian.event.api.EventPublisher eventPublisher, JiraProperties jiraProperties) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionconditionalUpdateWithVersion
(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) Deprecated, for removal: This API element is subject to removal in a future version.Index aDocument
conditionally based on the entity id and the version which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
conditionalUpdateWithVersion
(org.apache.lucene.document.Document issueDocument, Collection<org.apache.lucene.document.Document> commentDocuments, Collection<org.apache.lucene.document.Document> changeHistoryDocuments, Collection<org.apache.lucene.document.Document> worklogDocuments) Deprecated, for removal: This API element is subject to removal in a future version.Index an issue document with its related documents conditionally based on the entity ids and the versions which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
void
contributeToBackup
(BackupBuilder backupBuilder) Deprecated, for removal: This API element is subject to removal in a future version.Contribute a set of files to the givenbackupBuilder
to include them in the backup being created when this method was called.deindexComments
(Collection<? extends WithId> comments, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.deindexIssues
(Collection<? extends WithId> issues, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIdsdeindexIssues
(Collection<? extends WithId> issues, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIdsdeIndexProject
(Project project, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Remove all documents connected with given projectdeindexWorklogs
(Collection<? extends WithId> worklogs, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Delete all indexes.void
deleteIndexes
(IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Delete selected indexes.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.indexIssues
(EnclosedIterable<Issue> issues, Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Add documents for the supplied issues.indexIssuesBatchMode
(IssuesBatcher batcher, Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.No other index operations should be called while this method is being calledDeprecated, for removal: This API element is subject to removal in a future version.Issue searcher has to be closed after doing stuff.optimize()
Deprecated, for removal: This API element is subject to removal in a future version.reindexComments
(Collection<Comment> comments, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a collection of issue comments.reindexCommentsInParallel
(Collection<Comment> comments, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a collection of issue comments on multiple threads.reindexIssues
(EnclosedIterable<Issue> issues, Context context, IssueIndexingParams issueIndexingParams, boolean conditionalUpdate, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Re-index the given issues, delete any existing documents and add new ones.reindexIssuesBatchMode
(IssuesBatcher batcher, Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.No other index operations should be called while this method is being calledreindexWorklogs
(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.reindexWorklogsInParallel
(Collection<Worklog> worklogs, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a collection of issue worklogs on multiple threads.void
shutdown()
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.jira.issue.index.IssueIndexer
deindexComments, deindexWorklogs, reindexComments, reindexWorklogs
-
Constructor Details
-
DefaultIssueIndexer
public DefaultIssueIndexer(@Nonnull IndexDirectoryFactory indexDirectoryFactory, @Nonnull DefaultIssueIndexer.CommentRetriever commentRetriever, @Nonnull DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever, @Nonnull DefaultIssueIndexer.WorklogRetriever worklogRetriever, @Nonnull ApplicationProperties applicationProperties, @Nonnull IssueDocumentFactory issueDocumentFactory, @Nonnull CommentDocumentFactory commentDocumentFactory, @Nonnull ChangeHistoryDocumentFactory changeHistoryDocumentFactory, @Nonnull WorklogDocumentFactory worklogDocumentFactory, @Nonnull IssueManager issueManager, @Nonnull IndexBackupContributionStrategy backupPreparationStrategy, @Nullable IndexBackupContributorsManager indexBackupContributorsManager, @Nonnull DBRSender dbrSender, @Nonnull EntityVersioningManager entityVersioningManager, @Nonnull ReplicatedIndexManager replicatedIndexManager, @Nonnull IndexingFeatures indexingFeatures, @Nonnull IndexingLimitsStats indexingLimitsStats, @Nonnull com.atlassian.event.api.EventPublisher eventPublisher, @Nonnull JiraProperties jiraProperties) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getNumberOfIndexingThreads
public int getNumberOfIndexingThreads()Deprecated, for removal: This API element is subject to removal in a future version. -
deindexIssues
public Index.Result deindexIssues(@Nonnull Collection<? extends WithId> issues, @Nonnull Context context) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIds- Specified by:
deindexIssues
in interfaceIssueIndexer
- Parameters:
issues
- An iterable of WithIds for the Issues to de-index.context
- for showing the user the current status.
-
deindexIssues
public Index.Result deindexIssues(@Nonnull Collection<? extends WithId> issues, @Nonnull Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIds- Specified by:
deindexIssues
in interfaceIssueIndexer
- Parameters:
issues
- An iterable of WithIds for the Issues to de-index.context
- for showing the user the current status.shouldReplicate
- whether the index changes should be replicated to the other nodes in the cluster.
-
deIndexProject
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Remove all documents connected with given project- Specified by:
deIndexProject
in interfaceIssueIndexer
- Parameters:
project
- project object
-
indexIssues
public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Add documents for the supplied issues.- Specified by:
indexIssues
in interfaceIssueIndexer
- Parameters:
issues
- An iterable of issues to index.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexed
-
indexIssuesBatchMode
public AccumulatingResultBuilder indexIssuesBatchMode(@Nonnull IssuesBatcher batcher, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.No other index operations should be called while this method is being called- Specified by:
indexIssuesBatchMode
in interfaceIssueIndexer
- Parameters:
batcher
- An iterable over issue batches.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexed
-
reindexIssuesBatchMode
public AccumulatingResultBuilder reindexIssuesBatchMode(@Nonnull IssuesBatcher batcher, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.No other index operations should be called while this method is being called- Specified by:
reindexIssuesBatchMode
in interfaceIssueIndexer
- Parameters:
batcher
- an iterable over issue batches.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexed
-
reindexIssues
public Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams, boolean conditionalUpdate, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Re-index the given issues, delete any existing documents and add new ones.- Specified by:
reindexIssues
in interfaceIssueIndexer
- Parameters:
issues
- An iterable of issues to index.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexedconditionalUpdate
- set to true to use conditional updates when writing to the indexshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.
-
reindexComments
public Index.Result reindexComments(@Nonnull Collection<Comment> comments, @Nonnull Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Reindex a collection of issue comments.- Specified by:
reindexComments
in interfaceIssueIndexer
- Parameters:
comments
- Comments to be reindexed.context
- for showing the user the current status.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.
-
reindexCommentsInParallel
public Index.Result reindexCommentsInParallel(@Nonnull Collection<Comment> comments, @Nonnull Context context) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Reindex a collection of issue comments on multiple threads. This will not replicate the comments to the other nodes in cluster. As this method does not use conditional updates, it must be executed under index write lock.- Specified by:
reindexCommentsInParallel
in interfaceIssueIndexer
- Parameters:
comments
- Comments to be reindexed.context
- for showing the user the current status.
-
reindexWorklogsInParallel
public Index.Result reindexWorklogsInParallel(@Nonnull Collection<Worklog> worklogs, @Nonnull Context context) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Reindex a collection of issue worklogs on multiple threads. This will not replicate the worklogs to the other nodes in cluster. As this method does not use conditional updates, it must be executed under index write lock.- Specified by:
reindexWorklogsInParallel
in interfaceIssueIndexer
- Parameters:
worklogs
- Worklogs to be reindexed.context
- for showing the user the current status.
-
reindexWorklogs
public Index.Result reindexWorklogs(@Nonnull Collection<Worklog> worklogs, @Nonnull Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
reindexWorklogs
in interfaceIssueIndexer
-
deindexComments
public Index.Result deindexComments(@Nonnull Collection<? extends WithId> comments, @Nonnull Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deindexComments
in interfaceIssueIndexer
-
deindexWorklogs
public Index.Result deindexWorklogs(@Nonnull Collection<? extends WithId> worklogs, @Nonnull Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deindexWorklogs
in interfaceIssueIndexer
-
conditionalUpdateWithVersion
public Index.Result conditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Index aDocument
conditionally based on the entity id and the version which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
- Specified by:
conditionalUpdateWithVersion
in interfaceIssueIndexer
- Parameters:
indexName
- define the target indexdocument
- the document needs to be indexed
-
conditionalUpdateWithVersion
public Index.Result conditionalUpdateWithVersion(org.apache.lucene.document.Document issueDocument, Collection<org.apache.lucene.document.Document> commentDocuments, Collection<org.apache.lucene.document.Document> changeHistoryDocuments, Collection<org.apache.lucene.document.Document> worklogDocuments) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Index an issue document with its related documents conditionally based on the entity ids and the versions which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
- Specified by:
conditionalUpdateWithVersion
in interfaceIssueIndexer
- Parameters:
issueDocument
- issue document needs to be indexedcommentDocuments
- issue's comment documentschangeHistoryDocuments
- issue's history change documentsworklogDocuments
- issue's worklog documents
-
deleteIndexes
public void deleteIndexes()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Delete all indexes.- Specified by:
deleteIndexes
in interfaceIssueIndexer
-
deleteIndexes
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexer
Delete selected indexes.- Specified by:
deleteIndexes
in interfaceIssueIndexer
- Parameters:
issueIndexingParams
- parameters describing which indexes should be deleted.
-
openEntitySearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:UnmanagedIndexSearcherProvider
Issue searcher has to be closed after doing stuff. Note: when doing this you need to have the index read lock, as this may trigger creating index when not there; SeeIndexManagerBase.indexLock
. SeeIndexManagerBase.getEntitySearcher(IndexDirectoryFactory.Name)
()}.- Specified by:
openEntitySearcher
in interfaceUnmanagedIndexSearcherProvider
-
optimize
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
optimize
in interfaceIssueIndexer
-
shutdown
public void shutdown()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
shutdown
in interfaceIssueIndexer
-
getIndexPaths
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIndexPaths
in interfaceIssueIndexer
-
getIndexRootPath
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIndexRootPath
in interfaceIssueIndexer
-
contributeToBackup
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BackupContributor
Contribute a set of files to the givenbackupBuilder
to include them in the backup being created when this method was called.- Specified by:
contributeToBackup
in interfaceBackupContributor
- Parameters:
backupBuilder
- builder of the backup being created at the time of call. All existing and nonempty files passed to its accept method will be included. The builder may not be reusable and the reference should not be stored outside the scope of this method
-
OpenSearchIssueIndexer