Package com.atlassian.jira.issue.index
Interface IssueIndexingService
- All Known Subinterfaces:
IssueIndexManager
- All Known Implementing Classes:
BulkOnlyIndexManager
,DefaultIndexManager
Provides services related to the indexing of issue data.
This service largely replaces the
IssueIndexManager
that previously provided
those services.- Since:
- v7.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove an issue from the search index.default void
Deprecated.void
Deindexing issues from a given projectvoid
deIndexComments
(Set<WithId> commentsToDelete, boolean shouldReplicate) Remove a set of comments from the search index.default void
deIndexIssueObjects
(Set<Issue> issuesToDelete, boolean shouldReplicate) Deprecated.void
deIndexIssueObjectsById
(Set<? extends WithId> issuesToDelete, boolean shouldReplicate) Remove a set of issues from the search index.void
deIndexWorklogs
(Set<WithId> worklogsToDelete, boolean shouldReplicate) Remove a set of worklogs from the search index.void
Reindex an issue (eg.void
reIndex
(Issue issue, IssueIndexingParams issueIndexingParams) Reindex an issue (eg.long
Reindex all issues.long
reIndexAll
(Context context, boolean useBackgroundReindexing, boolean notifyCluster) Reindex all issues.long
reIndexAll
(Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) Reindex all issues.long
reIndexComments
(Collection<Comment> comments) Reindexes a collection of comments.long
reIndexComments
(Collection<Comment> comments, Context context) Reindexes a collection of comments.long
reIndexComments
(Collection<Comment> comments, Context context, boolean shouldReplicate) Reindexes a collection of comments.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects) Reindex a set of issues.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) Reindex a set of issues.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Reindex a set of issues.long
reIndexIssues
(IssuesIterable issuesIterable, Context context) Reindex a list of issues, passing an optional event that will be set progresslong
reIndexIssues
(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) Reindex a list of issues, passing an optional event that will be set progress.long
reIndexIssues
(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Reindex a list of issues, passing an optional Context for providing status updates.long
reIndexWorklogs
(Collection<Worklog> worklogs) Reindexes a collection of worklogs.long
reIndexWorklogs
(Collection<Worklog> worklogs, Context context) Reindexes a collection of worklogs.long
reIndexWorklogs
(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) Reindexes a collection of worklogs.
-
Method Details
-
reIndexAll
Reindex all issues.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexAll
long reIndexAll(Context context, boolean useBackgroundReindexing, boolean notifyCluster) throws IndexException Reindex all issues.- Parameters:
context
- used to report progress back to the user or to the logs. Must not be nulluseBackgroundReindexing
- whether to index in the background or not. If the useBackgroundReindexing option is set to true, then all related fields will not be reindexed.notifyCluster
- whether or not to notify the cluster about reindexing all- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexAll
long reIndexAll(Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) throws IndexException Reindex all issues. If the useBackgroundReindexing option is set to true, then only the basic issue information will be reindexed, unless the indexing parameters are also set. This is considered the normal mode for background re-indexing and is sufficient to correct the index for changes in the system configuration, but not for changes to the indexing language. If useBackgroundReindexing is set to false, than everything is always reindexed.- Parameters:
context
- used to report progress back to the user or to the logs. Must not be nulluseBackgroundReindexing
- whether to index in the background or notissueIndexingParams
- determines witch related objects should be indexed together with issues. Only relevant for background reindex operations.notifyCluster
- whether or not to notify the cluster about reindexing all- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssues
Reindex a list of issues, passing an optional event that will be set progress- Parameters:
issuesIterable
- IssuesIterablecontext
- used to report progress back to the user or to the logs. Must not be null.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssues
long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) throws IndexException Reindex a list of issues, passing an optional event that will be set progress. This method can optionally also index the comments and change history.- Parameters:
issuesIterable
- IssuesIterablecontext
- used to report progress back to the user or to the logs. Must not be null.issueIndexingParams
- determines witch related objects should be indexed together with issue.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssues
long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) throws IndexException Reindex a list of issues, passing an optional Context for providing status updates. This method can optionally also index the comments and change history. It also allows the caller to specify whether or not the indexing changes should be replicated to the rest of the cluster.- Parameters:
issuesIterable
- IssuesIterable of issues to reindexcontext
- used to report progress back to the user or to the logs. Must not be null.issueIndexingParams
- determines witch related objects should be indexed together with issue.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Returns:
- Reindex time in ms, -1 if there's an error.
- Throws:
IndexException
-
reIndex
Reindex an issue (eg. after field updates).- Throws:
IndexException
-
reIndex
Reindex an issue (eg. after field updates).- Throws:
IndexException
-
reIndexComments
Reindexes a collection of comments.- Parameters:
comments
- a collection of Comment- Throws:
IndexException
-
reIndexComments
Reindexes a collection of comments.- Parameters:
comments
- a collection of Commentcontext
- used to report progress back to the user or to the logs. Must not be null.- Throws:
IndexException
-
reIndexComments
long reIndexComments(Collection<Comment> comments, Context context, boolean shouldReplicate) throws IndexException Reindexes a collection of comments.- Parameters:
comments
- a collection of Commentcontext
- used to report progress back to the user or to the logs. Must not be null.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Throws:
IndexException
-
reIndexWorklogs
Reindexes a collection of worklogs.- Parameters:
worklogs
- a collection of Worklogs- Throws:
IndexException
-
reIndexWorklogs
Reindexes a collection of worklogs.- Parameters:
worklogs
- a collection of Worklogscontext
- used to report progress back to the user or to the logs. Must not be null.- Throws:
IndexException
-
reIndexWorklogs
long reIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) throws IndexException Reindexes a collection of worklogs.- Parameters:
worklogs
- a collection of Worklogscontext
- used to report progress back to the user or to the logs. Must not be null.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Throws:
IndexException
-
deIndex
Remove an issue from the search index.- Throws:
IndexException
-
deIndex
Deprecated.Remove an issue from the search index. Deprecated--kept for binary compatibility. Remove in 9.0- Throws:
IndexException
-
deIndexIssueObjectsById
void deIndexIssueObjectsById(Set<? extends WithId> issuesToDelete, boolean shouldReplicate) throws IndexException Remove a set of issues from the search index.- Parameters:
issuesToDelete
- set ofWithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Throws:
IndexException
-
deIndexIssueObjects
@Deprecated default void deIndexIssueObjects(Set<Issue> issuesToDelete, boolean shouldReplicate) throws IndexException Deprecated.Remove a set of issues from the search index. Deprecated--kept for binary compatibility. Change to take WithIds in 9.0- Parameters:
issuesToDelete
- set ofIssue
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Throws:
IndexException
-
reIndexIssueObjects
Reindex a set of issues.- Parameters:
issueObjects
- Set ofIssue
s to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) throws IndexException Reindex a set of issues.- Parameters:
issueObjects
- Set ofIssue
s to reindex.issueIndexingParams
- Determines witch related objects should be indexed together with issues.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) throws IndexException Reindex a set of issues.- Parameters:
issueObjects
- Set ofIssue
s to reindex.issueIndexingParams
- Determines witch related objects should be indexed together with issues.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
deIndex
Deindexing issues from a given project- Parameters:
project
- project objectshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndexComments
Remove a set of comments from the search index.- Parameters:
commentsToDelete
- set ofWithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndexWorklogs
Remove a set of worklogs from the search index.- Parameters:
worklogsToDelete
- set ofWithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.
-