Package com.atlassian.jira.issue.index
Interface IssueIndexManager
- All Superinterfaces:
IndexLifecycleManager
,IssueIndexingService
,Shutdown
,Sized
- All Known Implementing Classes:
BulkOnlyIndexManager
,DefaultIndexManager
Manages Lucene search indexes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deIndex
(org.ofbiz.core.entity.GenericValue issue) Deprecated.org.apache.lucene.analysis.Analyzer
Returns anAnalyzer
for indexing.org.apache.lucene.analysis.Analyzer
Returns anAnalyzer
for searching.Get anIndexSearcher
that can be used to search the change history index.Get anIndexSearcher
that can be used to search the comment index.Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes.Get anIndexSearcher
that can be used to search the issue index.Gets the latest index date based on the most recent issue updated date.Get the root path of the index directory for plugins.Get anIndexSearcher
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.void
Deprecated.Call this asIssueIndexingService.reIndex(Issue)
instead.void
Deprecated.Since v6.4, usereIndex(Issue, IssueIndexingParams)
.void
reIndex
(Issue issue, IssueIndexingParams issueIndexingParams) Deprecated.Call this asIssueIndexingService.reIndex(Issue, IssueIndexingParams)
instead.void
reIndex
(org.ofbiz.core.entity.GenericValue issue) Deprecated.Since v5.0.long
Deprecated.Call this asIssueIndexingService.reIndexAll()
instead.long
reIndexAll
(Context context, boolean useBackgroundReindexing, boolean notifyCluster) Deprecated.Call this asIssueIndexingService.reIndexAll(Context, boolean, boolean)
instead.long
reIndexAll
(Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) Deprecated.since v6.4 usereIndexAll(Context, boolean, IssueIndexingParams, boolean)
instead.long
reIndexAll
(Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) Deprecated.Call this asIssueIndexingService.reIndexAll(Context, boolean, IssueIndexingParams, boolean)
instead.long
reIndexComments
(Collection<Comment> comments) Deprecated.Call this asIssueIndexingService.reIndexComments(Collection)
instead.long
reIndexComments
(Collection<Comment> comments, Context context) Deprecated.Call this asIssueIndexingService.reIndexComments(Collection, Context)
instead.long
reIndexComments
(Collection<Comment> comments, Context context, boolean shouldReplicate) Deprecated.Call this asIssueIndexingService.reIndexComments(Collection, Context, boolean)
instead.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects) Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection)
instead.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated.Since v6.4, usereIndexIssueObjects(Collection, IssueIndexingParams)
.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) Deprecated.Since v6.4, usereIndexIssueObjects(Collection, IssueIndexingParams, boolean)
.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection, IssueIndexingParams)
instead.long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection, IssueIndexingParams, boolean)
instead.long
reIndexIssues
(IssuesIterable issuesIterable, Context context) Deprecated.Call this asIssueIndexingService.reIndexIssues(IssuesIterable, Context)
instead.long
reIndexIssues
(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated.Since v6.4, usereIndexIssues(IssuesIterable, Context, IssueIndexingParams)
.long
reIndexIssues
(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) Deprecated.Call this asIssueIndexingService.reIndexIssues(IssuesIterable, Context, IssueIndexingParams)
instead.long
reIndexIssues
(Collection<org.ofbiz.core.entity.GenericValue> issues) Deprecated.Since v5.0, usereIndexIssueObjects(Collection)
instead.long
reIndexWorklogs
(Collection<Worklog> worklogs) Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection)
instead.long
reIndexWorklogs
(Collection<Worklog> worklogs, Context context) Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection, Context)
instead.long
reIndexWorklogs
(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection, Context, boolean)
instead.long
release()
Release indexing on this thread.boolean
withReindexLock
(Runnable runnable) Runs the given runnable under the 'stop the world' reindex lock.Methods inherited from interface com.atlassian.jira.util.index.IndexLifecycleManager
activate, activate, deactivate, getAllIndexPaths, isIndexAvailable, isIndexConsistent, optimize, reIndexAll, reIndexAll, reIndexAllIssuesInBackground, reIndexIssuesInBackground, shutdown, size
Methods inherited from interface com.atlassian.jira.issue.index.IssueIndexingService
deIndex, deIndex, deIndex, deIndexComments, deIndexIssueObjects, deIndexIssueObjectsById, deIndexWorklogs, reIndexIssues
-
Method Details
-
hold
void hold()Temporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.- Since:
- v5.1
-
isHeld
boolean isHeld()Return true if the index is held.- Since:
- v5.1
-
release
Release indexing on this thread. All queued index requests will be processed.- Returns:
- Reindex time in ms.
- Throws:
IndexException
- if an error occurs- Since:
- v5.1
-
getPluginsRootPath
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 -
getExistingPluginsPaths
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. SeegetPluginsRootPath()
.If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.
-
getIssueSearcher
ManagedIndexSearcher getIssueSearcher()Get anIndexSearcher
that can be used to search the issue index. -
getCommentSearcher
ManagedIndexSearcher getCommentSearcher()Get anIndexSearcher
that can be used to search the comment index. -
getChangeHistorySearcher
ManagedIndexSearcher getChangeHistorySearcher()Get anIndexSearcher
that can be used to search the change history index. -
getWorklogSearcher
ManagedIndexSearcher getWorklogSearcher()Get anIndexSearcher
that can be used to search the worklog index. -
getAnalyzerForSearching
org.apache.lucene.analysis.Analyzer getAnalyzerForSearching()Returns anAnalyzer
for searching.- Returns:
- an analyzer for searching
-
getAnalyzerForIndexing
org.apache.lucene.analysis.Analyzer getAnalyzerForIndexing()Returns anAnalyzer
for indexing.- Returns:
- an analyzer for indexing.
-
withReindexLock
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
- Since:
- v6.3
-
reIndexAll
Deprecated.Call this asIssueIndexingService.reIndexAll()
instead. Since v7.0.Reindex all issues.- Specified by:
reIndexAll
in interfaceIssueIndexingService
- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexAll
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, boolean notifyCluster) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexAll(Context, boolean, boolean)
instead. Since v7.0.Reindex all issues.- Specified by:
reIndexAll
in interfaceIssueIndexingService
- 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
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) throws IndexException Deprecated.Call this asIssueIndexingService.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.- Specified by:
reIndexAll
in interfaceIssueIndexingService
- 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
- Since:
- v6.4
-
reIndexIssues
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexIssues(IssuesIterable, Context)
instead. Since v7.0.Reindex a list of issues, passing an optional event that will be set progress- Specified by:
reIndexIssues
in interfaceIssueIndexingService
- 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
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) throws IndexException Deprecated.Call this asIssueIndexingService.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.- Specified by:
reIndexIssues
in interfaceIssueIndexingService
- 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
- Since:
- v6.4
-
reIndex
Deprecated.Call this asIssueIndexingService.reIndex(Issue)
instead. Since v7.0.Reindex an issue (eg. after field updates).- Specified by:
reIndex
in interfaceIssueIndexingService
- Throws:
IndexException
-
reIndex
@Deprecated void reIndex(Issue issue, IssueIndexingParams issueIndexingParams) throws IndexException Deprecated.Call this asIssueIndexingService.reIndex(Issue, IssueIndexingParams)
instead. Since v7.0.Reindex an issue (eg. after field updates).- Specified by:
reIndex
in interfaceIssueIndexingService
- Throws:
IndexException
- Since:
- 6.3
-
reIndexComments
Deprecated.Call this asIssueIndexingService.reIndexComments(Collection)
instead. Since v7.0.Reindexes a collection of comments.- Specified by:
reIndexComments
in interfaceIssueIndexingService
- Parameters:
comments
- a collection of Comment- Throws:
IndexException
- Since:
- v5.2
-
reIndexComments
@Deprecated long reIndexComments(Collection<Comment> comments, Context context) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexComments(Collection, Context)
instead. Since v7.0.Reindexes a collection of comments.- Specified by:
reIndexComments
in interfaceIssueIndexingService
- Parameters:
comments
- a collection of Commentcontext
- used to report progress back to the user or to the logs. Must not be null.- Throws:
IndexException
- Since:
- v5.2
-
reIndexComments
@Deprecated long reIndexComments(Collection<Comment> comments, Context context, boolean shouldReplicate) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexComments(Collection, Context, boolean)
instead. Since v7.0.Reindexes a collection of comments.- Specified by:
reIndexComments
in interfaceIssueIndexingService
- 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
- Since:
- v6.1
-
reIndexWorklogs
Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection)
instead. Since v7.0.Reindexes a collection of worklogs.- Specified by:
reIndexWorklogs
in interfaceIssueIndexingService
- Parameters:
worklogs
- a collection of Worklogs- Throws:
IndexException
- Since:
- v6.4
-
reIndexWorklogs
@Deprecated long reIndexWorklogs(Collection<Worklog> worklogs, Context context) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection, Context)
instead. Since v7.0.Reindexes a collection of worklogs.- Specified by:
reIndexWorklogs
in interfaceIssueIndexingService
- Parameters:
worklogs
- a collection of Worklogscontext
- used to report progress back to the user or to the logs. Must not be null.- Throws:
IndexException
- Since:
- v6.4
-
reIndexWorklogs
@Deprecated long reIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexWorklogs(Collection, Context, boolean)
instead. Since v7.0.Reindexes a collection of worklogs.- Specified by:
reIndexWorklogs
in interfaceIssueIndexingService
- 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
- Since:
- v6.4
-
reIndexIssueObjects
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection)
instead. Since v7.0.Reindex a set of issues.- Specified by:
reIndexIssueObjects
in interfaceIssueIndexingService
- Parameters:
issueObjects
- Set ofIssue
s to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
- Since:
- v5.2
-
reIndexIssueObjects
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection, IssueIndexingParams)
instead. Since v7.0.Reindex a set of issues.- Specified by:
reIndexIssueObjects
in interfaceIssueIndexingService
- 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
- Since:
- v6.4
-
reIndexIssueObjects
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) throws IndexException Deprecated.Call this asIssueIndexingService.reIndexIssueObjects(Collection, IssueIndexingParams, boolean)
instead. Since v7.0.Reindex a set of issues.- Specified by:
reIndexIssueObjects
in interfaceIssueIndexingService
- 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
- Since:
- v6.4
-
reIndexAll
@Deprecated long reIndexAll(Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) throws IndexException Deprecated.since v6.4 usereIndexAll(Context, boolean, IssueIndexingParams, boolean)
instead. Since v7.0 useIssueIndexingService.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 nulluseBackgroundReindexing
- whether to index in the background or notreIndexComments
- 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.notifyCluster
- whether or not to notify the cluster about reindexing all- Returns:
- Reindex time in ms.
- Throws:
IndexException
- Since:
- 6.2
-
reIndex
Deprecated.Since v5.0. UsereIndex(Issue)
instead. Since v7.0, useIssueIndexingService.reIndex(Issue)
instead.Reindex an issue (eg. after field updates).- Throws:
IndexException
-
reIndexIssues
@Deprecated long reIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.Since v6.4, usereIndexIssues(IssuesIterable, Context, IssueIndexingParams)
. Since v7.0, useIssueIndexingService.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
- IssuesIterablecontext
- used to report progress back to the user or to the logs. Must not be null.reIndexComments
- a boolean indicating whether to index issue commentsreIndexChangeHistory
- a boolean indicating whether to index issue change history- Returns:
- Reindex time in ms.
- Throws:
IndexException
- Since:
- v5.2
-
reIndex
@Deprecated void reIndex(Issue issue, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.Since v6.4, usereIndex(Issue, IssueIndexingParams)
. Since v7.0, useIssueIndexingService.reIndex(Issue, IssueIndexingParams)
.Reindex an issue (eg. after field updates).- Throws:
IndexException
- Since:
- v5.2
-
deIndex
Deprecated.Since v5.0 useIssueIndexingService.deIndex(Issue)
instead. Since v7.0 useIssueIndexingService.deIndex(Issue)
instead.Remove an issue from the search index.- Throws:
IndexException
-
reIndexIssues
@Deprecated long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) throws IndexException Deprecated.Since v5.0, usereIndexIssueObjects(Collection)
instead. Since v7.0, useIssueIndexingService.reIndexIssueObjects(Collection)
instead.Reindex a set of issues (GenericValues). UsereIndexIssueObjects(Collection)
instead when possible.- Parameters:
issues
- The IssueGenericValue
s to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.Since v6.4, usereIndexIssueObjects(Collection, IssueIndexingParams)
. Since v7.0, useIssueIndexingService.reIndexIssueObjects(Collection, IssueIndexingParams)
.Reindex a set of issues.- Parameters:
issueObjects
- Set ofIssue
s to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
@Deprecated long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) throws IndexException Deprecated.Reindex a set of issues.- Parameters:
issueObjects
- Set ofIssue
s to reindex.reIndexComments
- whether to reindex the comments or notreIndexChangeHistory
- whether to reindex changeHistory or notshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
getLatestIndexDate
Gets the latest index date based on the most recent issue updated date.- Returns:
- latest index update date or null if no issues in index or no updated value in issues
-
IssueIndexingService.deIndex(Issue)
instead.