public interface

IssueIndexManager

implements IssueIndexingService IndexLifecycleManager
com.atlassian.jira.issue.index.IssueIndexManager
Known Indirect Subclasses

Class Overview

Manages Lucene search indexes.

Summary

Public Methods
@Deprecated void deIndex(GenericValue issue)
This method is deprecated. Since v5.0 use deIndex(Issue) instead. Since v7.0 use deIndex(Issue) instead.
@Deprecated void deIndex(Issue issue)
This method is deprecated. Call this as deIndex(Issue) instead. Since v7.0.
@Deprecated void deIndexIssueObjects(Set<Issue> issuesToDelete, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as deIndexIssueObjects(Set, boolean) instead. Since v7.0.
Analyzer getAnalyzerForIndexing()
Returns an Analyzer for indexing.
Analyzer getAnalyzerForSearching()
Returns an Analyzer for searching.
IndexSearcher getChangeHistorySearcher()
Get an IndexSearcher that can be used to search the change history index.
IndexSearcher getCommentSearcher()
Get an IndexSearcher that can be used to search the comment index.
Collection<String> getExistingPluginsPaths()
Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes.
IndexSearcher getIssueSearcher()
Get an IndexSearcher that can be used to search the issue index.
String getPluginsRootPath()
Get the root path of the index directory for plugins.
IndexSearcher getWorklogSearcher()
Get an IndexSearcher that can be used to search the worklog index.
void hold()
Temporarily suspend indexing on this thread.
boolean isHeld()
Return true if the index is held.
@Deprecated void reIndex(Issue issue, IssueIndexingParams issueIndexingParams)
This method is deprecated. Call this as reIndex(Issue, IssueIndexingParams) instead. Since v7.0.
@Deprecated void reIndex(GenericValue issue)
This method is deprecated. Since v5.0. Use reIndex(Issue) instead. Since v7.0, use reIndex(Issue) instead.
@Deprecated void reIndex(Issue issue, boolean reIndexComments, boolean reIndexChangeHistory)
This method is deprecated. Since v6.4, use reIndex(Issue, IssueIndexingParams). Since v7.0, use reIndex(Issue, IssueIndexingParams).
@Deprecated void reIndex(Issue issue)
This method is deprecated. Call this as reIndex(Issue) instead. Since v7.0.
@Deprecated long reIndexAll()
This method is deprecated. Call this as reIndexAll() instead. Since v7.0.
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead. Since v7.0.
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as reIndexAll(Context, boolean, boolean) instead. Since v7.0.
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean updateReplicatedIndexStore)
This method is deprecated. since v6.4 use reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead. Since v7.0 use reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead.
@Deprecated long reIndexComments(Collection<Comment> comments, Context context, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as reIndexComments(Collection, Context, boolean) instead. Since v7.0.
@Deprecated long reIndexComments(Collection<Comment> comments)
This method is deprecated. Call this as reIndexComments(Collection) instead. Since v7.0.
@Deprecated long reIndexComments(Collection<Comment> comments, Context context)
This method is deprecated. Call this as reIndexComments(Collection, Context) instead. Since v7.0.
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as reIndexIssueObjects(Collection, IssueIndexingParams, boolean) instead. Since v7.0.
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory)
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean updateReplicatedIndexStore)
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams)
This method is deprecated. Call this as reIndexIssueObjects(Collection, IssueIndexingParams) instead. Since v7.0.
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects)
This method is deprecated. Call this as reIndexIssueObjects(Collection) instead. Since v7.0.
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory)
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams)
This method is deprecated. Call this as reIndexIssues(IssuesIterable, Context, IssueIndexingParams) instead. Since v7.0.
@Deprecated long reIndexIssues(Collection<GenericValue> issues)
This method is deprecated. Since v5.0, use reIndexIssueObjects(Collection) instead. Since v7.0, use reIndexIssueObjects(Collection) instead.
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context)
This method is deprecated. Call this as reIndexIssues(IssuesIterable, Context) instead. Since v7.0.
@Deprecated long reIndexWorklogs(Collection<Worklog> worklogs)
This method is deprecated. Call this as reIndexWorklogs(Collection) instead. Since v7.0.
@Deprecated long reIndexWorklogs(Collection<Worklog> worklogs, Context context)
This method is deprecated. Call this as reIndexWorklogs(Collection, Context) instead. Since v7.0.
@Deprecated long reIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean updateReplicatedIndexStore)
This method is deprecated. Call this as reIndexWorklogs(Collection, Context, boolean) instead. Since v7.0.
long release()
Release indexing on this thread.
boolean withReindexLock(Runnable runnable)
Runs the given runnable under the 'stop the world' reindex lock.
[Expand]
Inherited Methods
From interface com.atlassian.jira.issue.index.IssueIndexingService
From interface com.atlassian.jira.util.Shutdown
From interface com.atlassian.jira.util.collect.Sized
From interface com.atlassian.jira.util.index.IndexLifecycleManager

Public Methods

@Deprecated public void deIndex (GenericValue issue)

This method is deprecated.
Since v5.0 use deIndex(Issue) instead. Since v7.0 use deIndex(Issue) instead.

Remove an issue from the search index.

@Deprecated public void deIndex (Issue issue)

This method is deprecated.
Call this as deIndex(Issue) instead. Since v7.0.

Remove an issue from the search index.

@Deprecated public void deIndexIssueObjects (Set<Issue> issuesToDelete, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as deIndexIssueObjects(Set, boolean) instead. Since v7.0.

Remove a set of issues from the search index.

public Analyzer getAnalyzerForIndexing ()

Returns an Analyzer for indexing.

Returns
  • an analyzer for indexing.

public Analyzer getAnalyzerForSearching ()

Returns an Analyzer for searching.

Returns
  • an analyzer for searching

public IndexSearcher getChangeHistorySearcher ()

Get an IndexSearcher that can be used to search the change history index.

Note: This is an unmanaged IndexSearcher. You MUST call close() when you are done with it. Alternatively you should really call passing in CHANGE_HISTORY_INDEX as it is a managed searcher and all the closing semantics are handled for you.

public IndexSearcher getCommentSearcher ()

Get an IndexSearcher that can be used to search the comment index.

Note: This is an unmanaged IndexSearcher. You MUST call close() when you are done with it. Alternatively you should really call passing in COMMENT_INDEX as it is a managed searcher and all the closing semantics are handled for you.

public Collection<String> getExistingPluginsPaths ()

Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes. Each directory in the collection should be a sub-directory under the plugin's index root path. See getPluginsRootPath().

If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.

public IndexSearcher getIssueSearcher ()

Get an IndexSearcher that can be used to search the issue index.

Note: This is an unmanaged IndexSearcher. You MUST call close() when you are done with it. Alternatively you should really call passing in ISSUE_INDEX as it is a managed searcher and all the closing semantics are handled for you.

public String getPluginsRootPath ()

Get the root path of the index directory for plugins. Any plugin that keeps indexes should create its own sub-directory under this path and create its indexes in its own sub-directory

public IndexSearcher getWorklogSearcher ()

Get an IndexSearcher that can be used to search the worklog index.

Note: This is an unmanaged IndexSearcher. You MUST call close() when you are done with it. Alternatively you should really call passing in WORKLOG_INDEX as it is a managed searcher and all the closing semantics are handled for you.

public void hold ()

Temporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.

public boolean isHeld ()

Return true if the index is held.

@Deprecated public void reIndex (Issue issue, IssueIndexingParams issueIndexingParams)

This method is deprecated.
Call this as reIndex(Issue, IssueIndexingParams) instead. Since v7.0.

Reindex an issue (eg. after field updates).

@Deprecated public void reIndex (GenericValue issue)

This method is deprecated.
Since v5.0. Use reIndex(Issue) instead. Since v7.0, use reIndex(Issue) instead.

Reindex an issue (eg. after field updates).

@Deprecated public void reIndex (Issue issue, boolean reIndexComments, boolean reIndexChangeHistory)

This method is deprecated.
Since v6.4, use reIndex(Issue, IssueIndexingParams). Since v7.0, use reIndex(Issue, IssueIndexingParams).

Reindex an issue (eg. after field updates).

@Deprecated public void reIndex (Issue issue)

This method is deprecated.
Call this as reIndex(Issue) instead. Since v7.0.

Reindex an issue (eg. after field updates).

@Deprecated public long reIndexAll ()

This method is deprecated.
Call this as reIndexAll() instead. Since v7.0.

Reindex all issues.

Returns
  • Reindex time in ms.

@Deprecated public long reIndexAll (Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead. Since v7.0.

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.
updateReplicatedIndexStore whether to update the replicated index or not
Returns
  • Reindex time in ms.

@Deprecated public long reIndexAll (Context context, boolean useBackgroundReindexing, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as reIndexAll(Context, boolean, boolean) instead. Since v7.0.

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.
updateReplicatedIndexStore whether to update the replicated index or not
Returns
  • Reindex time in ms.

@Deprecated public long reIndexAll (Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean updateReplicatedIndexStore)

This method is deprecated.
since v6.4 use reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead. Since v7.0 use reIndexAll(Context, boolean, IssueIndexingParams, boolean) instead.

Reindex all issues. If the useBackgroundReindexing option is set to true, then only the basic issue information will be reindexed, unless the reIndexComments or reIndexChangeHistory 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
reIndexComments Also reindex all the issue comments. Only relevant for background reindex operations.
reIndexChangeHistory Also reindex the issue change history. Only relevant for background reindex operations.
updateReplicatedIndexStore whether to update the replicated index or not
Returns
  • Reindex time in ms.

@Deprecated public long reIndexComments (Collection<Comment> comments, Context context, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as reIndexComments(Collection, Context, boolean) instead. Since v7.0.

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.
updateReplicatedIndexStore whether to update the replicated index or not

@Deprecated public long reIndexComments (Collection<Comment> comments)

This method is deprecated.
Call this as reIndexComments(Collection) instead. Since v7.0.

Reindexes a collection of comments.

Parameters
comments a collection of Comment

@Deprecated public long reIndexComments (Collection<Comment> comments, Context context)

This method is deprecated.
Call this as reIndexComments(Collection, Context) instead. Since v7.0.

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.

@Deprecated public long reIndexIssueObjects (Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as reIndexIssueObjects(Collection, IssueIndexingParams, boolean) instead. Since v7.0.

Reindex a set of issues.

Parameters
issueObjects Set of Issues to reindex.
issueIndexingParams Determines witch related objects should be indexed together with issues.
updateReplicatedIndexStore whether to store index operations in the replicated index store
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssueObjects (Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory)

This method is deprecated.
Since v6.4, use reIndexIssueObjects(Collection, IssueIndexingParams). Since v7.0, use reIndexIssueObjects(Collection, IssueIndexingParams).

Reindex a set of issues.

Parameters
issueObjects Set of Issues to reindex.
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssueObjects (Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean updateReplicatedIndexStore)

This method is deprecated.
Since v6.4, use reIndexIssueObjects(Collection, IssueIndexingParams, boolean). Since v7.0, use reIndexIssueObjects(Collection, IssueIndexingParams, boolean).

Reindex a set of issues.

Parameters
issueObjects Set of Issues to reindex.
reIndexComments whether to reindex the comments or not
reIndexChangeHistory whether to reindex changeHistory or not
updateReplicatedIndexStore whether to store index operations in the replicated index store
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssueObjects (Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams)

This method is deprecated.
Call this as reIndexIssueObjects(Collection, IssueIndexingParams) instead. Since v7.0.

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.

@Deprecated public long reIndexIssueObjects (Collection<? extends Issue> issueObjects)

This method is deprecated.
Call this as reIndexIssueObjects(Collection) instead. Since v7.0.

Reindex a set of issues.

Parameters
issueObjects Set of Issues to reindex.
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssues (IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory)

This method is deprecated.
Since v6.4, use reIndexIssues(IssuesIterable, Context, IssueIndexingParams). Since v7.0, use reIndexIssues(IssuesIterable, Context, IssueIndexingParams).

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.
reIndexComments a boolean indicating whether to index issue comments
reIndexChangeHistory a boolean indicating whether to index issue change history
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssues (IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams)

This method is deprecated.
Call this as reIndexIssues(IssuesIterable, Context, IssueIndexingParams) instead. Since v7.0.

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.

@Deprecated public long reIndexIssues (Collection<GenericValue> issues)

This method is deprecated.
Since v5.0, use reIndexIssueObjects(Collection) instead. Since v7.0, use reIndexIssueObjects(Collection) instead.

Reindex a set of issues (GenericValues). Use reIndexIssueObjects(Collection) instead when possible.

Parameters
issues The Issue GenericValues to reindex.
Returns
  • Reindex time in ms.

@Deprecated public long reIndexIssues (IssuesIterable issuesIterable, Context context)

This method is deprecated.
Call this as reIndexIssues(IssuesIterable, Context) instead. Since v7.0.

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.

@Deprecated public long reIndexWorklogs (Collection<Worklog> worklogs)

This method is deprecated.
Call this as reIndexWorklogs(Collection) instead. Since v7.0.

Reindexes a collection of worklogs.

Parameters
worklogs a collection of Worklogs

@Deprecated public long reIndexWorklogs (Collection<Worklog> worklogs, Context context)

This method is deprecated.
Call this as reIndexWorklogs(Collection, Context) instead. Since v7.0.

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.

@Deprecated public long reIndexWorklogs (Collection<Worklog> worklogs, Context context, boolean updateReplicatedIndexStore)

This method is deprecated.
Call this as reIndexWorklogs(Collection, Context, boolean) instead. Since v7.0.

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.
updateReplicatedIndexStore whether to update the replicated index or not

public long release ()

Release indexing on this thread. All queued index requests will be processed.

Returns
  • Reindex time in ms.
Throws
IndexException if an error occurs

public boolean withReindexLock (Runnable runnable)

Runs the given runnable under the 'stop the world' reindex lock.

Parameters
runnable The runnable to be executed
Returns
  • true if the lock could be acquired, false otherwise