Interface IssueIndexingService

All Known Subinterfaces:
IssueIndexManager
All Known Implementing Classes:
BulkOnlyIndexManager, DefaultIndexManager

@InjectableComponent @PublicApi public interface IssueIndexingService
Provides services related to the indexing of issue data. This service largely replaces the IssueIndexManager that previously provided those services.
Since:
v7.0
  • Method Details

    • reIndexAll

      long reIndexAll() throws IndexException
      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 null
      useBackgroundReindexing - 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 null
      useBackgroundReindexing - whether to index in the background or not
      issueIndexingParams - 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

      long reIndexIssues(IssuesIterable issuesIterable, Context context) throws IndexException
      Reindex a list of issues, passing an optional event that will be set progress
      Parameters:
      issuesIterable - IssuesIterable
      context - 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 - IssuesIterable
      context - 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 reindex
      context - 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

      void reIndex(Issue issue) throws IndexException
      Reindex an issue (eg. after field updates).
      Throws:
      IndexException
    • reIndex

      void reIndex(Issue issue, IssueIndexingParams issueIndexingParams) throws IndexException
      Reindex an issue (eg. after field updates).
      Throws:
      IndexException
    • reIndexComments

      long reIndexComments(Collection<Comment> comments) throws IndexException
      Reindexes a collection of comments.
      Parameters:
      comments - a collection of Comment
      Throws:
      IndexException
    • reIndexComments

      long reIndexComments(Collection<Comment> comments, Context context) throws IndexException
      Reindexes a collection of comments.
      Parameters:
      comments - a collection of Comment
      context - 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 Comment
      context - 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

      long reIndexWorklogs(Collection<Worklog> worklogs) throws IndexException
      Reindexes a collection of worklogs.
      Parameters:
      worklogs - a collection of Worklogs
      Throws:
      IndexException
    • reIndexWorklogs

      long reIndexWorklogs(Collection<Worklog> worklogs, Context context) throws IndexException
      Reindexes a collection of worklogs.
      Parameters:
      worklogs - a collection of Worklogs
      context - 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 Worklogs
      context - 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

      void deIndex(WithId issueWithId) throws IndexException
      Remove an issue from the search index.
      Throws:
      IndexException
    • deIndex

      @Deprecated default void deIndex(Issue issue) throws IndexException
      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 of WithIds 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 of Issues to deIndex.
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.
      Throws:
      IndexException
    • reIndexIssueObjects

      long reIndexIssueObjects(Collection<? extends Issue> issueObjects) throws IndexException
      Reindex a set of issues.
      Parameters:
      issueObjects - Set of Issues 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 of Issues 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 of Issues 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

      void deIndex(Project project, boolean shouldReplicate)
      Deindexing issues from a given project
      Parameters:
      project - project object
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.
    • deIndexComments

      void deIndexComments(Set<WithId> commentsToDelete, boolean shouldReplicate)
      Remove a set of comments from the search index.
      Parameters:
      commentsToDelete - set of WithIds to deIndex.
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.
    • deIndexWorklogs

      void deIndexWorklogs(Set<WithId> worklogsToDelete, boolean shouldReplicate)
      Remove a set of worklogs from the search index.
      Parameters:
      worklogsToDelete - set of WithIds to deIndex.
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.