Package com.atlassian.jira.issue.index
Class IndexManagerBase
java.lang.Object
com.atlassian.jira.issue.index.IndexManagerBase
- All Implemented Interfaces:
InternalIndexingService,IssueIndexingService,IssueIndexManager,JiraIndexManager,Sized,IndexLifecycleManager,Shutdown
- Direct Known Subclasses:
BulkOnlyIndexManager,DefaultIndexManager
@Deprecated(since="10.4",
forRemoval=true)
public class IndexManagerBase
extends Object
implements JiraIndexManager
Deprecated, for removal: This API element is subject to removal in a future version.
since 10.4 for removal. No replacement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.lucene.analysis.AnalyzerDeprecated, for removal: This API element is subject to removal in a future version.static final org.apache.lucene.analysis.AnalyzerDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionIndexManagerBase(IndexingConfiguration indexProperties, IssueIndexer issueIndexer, IndexPathManager indexPath, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, IssueManager issueManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ArchivingDao archivingDao, SearcherCache searcherCache, TimeTrackingConfiguration timeTrackingConfiguration, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, ArchivingLicenseCheck archivingLicenseCheck, FeatureManager featureManager, IndexConsistencyChecker indexConsistencyChecker) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionlongDeprecated, for removal: This API element is subject to removal in a future version.Activates search indexes.longDeprecated, for removal: This API element is subject to removal in a future version.Activates search indexes.voidconditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) Deprecated, for removal: This API element is subject to removal in a future version.Index aDocumentconditionally based on the entity id and the version which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)voidconditionalUpdateWithVersion(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)voidDeprecated, for removal: This API element is subject to removal in a future version.De-activates indexing (as happens from the admin page) and removes index directories.voidDeprecated, for removal: This API element is subject to removal in a future version.Remove an issue from the search index.voidDeprecated, for removal: This API element is subject to removal in a future version.Deindexing issues from a given projectvoiddeIndex(org.ofbiz.core.entity.GenericValue entity) Deprecated, for removal: This API element is subject to removal in a future version.Remove an issue from the search index.voiddeIndexComments(Set<WithId> commentsToDeIndex, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Remove a set of comments from the search index.voiddeIndexIssueObjectsById(Set<? extends WithId> issuesToDelete, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Remove a set of issues from the search index.voiddeIndexWorklogs(Set<WithId> worklogsToDeIndex, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Remove a set of worklogs from the search index.Deprecated, for removal: This API element is subject to removal in a future version.org.apache.lucene.analysis.AnalyzerDeprecated, for removal: This API element is subject to removal in a future version.Returns anAnalyzerfor indexing.org.apache.lucene.analysis.AnalyzerDeprecated, for removal: This API element is subject to removal in a future version.Returns anAnalyzerfor searching.Deprecated, for removal: This API element is subject to removal in a future version.Get anIndexSearcherthat can be used to search the change history index.Deprecated, for removal: This API element is subject to removal in a future version.Get anIndexSearcherthat can be used to search the comment index.Deprecated, for removal: This API element is subject to removal in a future version.Get anIndexSearcherthat can be used to search the index specified by theIndexDirectoryFactory.Name.Deprecated, for removal: This API element is subject to removal in a future version.Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes.Deprecated, for removal: This API element is subject to removal in a future version.Get anIndexSearcherthat can be used to search the issue index.Deprecated, for removal: This API element is subject to removal in a future version.Gets the latest index date based on the most recent issue updated date.Deprecated, for removal: This API element is subject to removal in a future version.Get the root path of the index directory for plugins.Deprecated, for removal: This API element is subject to removal in a future version.Get anIndexSearcherthat can be used to search the worklog index.voidhold()Deprecated, for removal: This API element is subject to removal in a future version.Temporarily suspend indexing on this thread.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.booleanisHeld()Deprecated, for removal: This API element is subject to removal in a future version.Return true if the index is held on this thread.booleanDeprecated, for removal: This API element is subject to removal in a future version.Whether this index is available.booleanDeprecated, for removal: This API element is subject to removal in a future version.longoptimize()Deprecated, for removal: This API element is subject to removal in a future version.Optimize the underlying indexes.voidDeprecated, for removal: This API element is subject to removal in a future version.Reindex an issue (eg.voidDeprecated, for removal: This API element is subject to removal in a future version.Reindex an issue (eg.voidreIndex(Issue issue, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Reindex an issue (eg.voidreIndex(org.ofbiz.core.entity.GenericValue issueGV) Deprecated, for removal: This API element is subject to removal in a future version.Reindex an issue (eg.longDeprecated, for removal: This API element is subject to removal in a future version.Reindex all issues.longreIndexAll(Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindex everything.longreIndexAll(Context context, boolean useBackgroundIndexing) Deprecated, for removal: This API element is subject to removal in a future version.longreIndexAll(Context context, boolean useBackgroundIndexing, boolean notifyCluster) Deprecated, for removal: This API element is subject to removal in a future version.Reindex all issues.longreIndexAll(Context context, boolean useBackgroundIndexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) Deprecated, for removal: This API element is subject to removal in a future version.Reindex all issues.longreIndexAll(Context context, boolean useBackgroundIndexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) Deprecated, for removal: This API element is subject to removal in a future version.Reindex all issues.longreIndexAll(Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Reindex indexes defined by theIssueIndexingParams.longreIndexAllIssuesInBackground(Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindex everything, but don't stop the world Comments and change history will not be reindexed.longreIndexComments(Collection<Comment> comments) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of comments.longreIndexComments(Collection<Comment> comments, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of comments.longreIndexComments(Collection<Comment> comments, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of comments.voidreindexCommentsInParallel(Collection<Comment> comments, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes comments on multiple threads.longreIndexIssueObjects(Collection<? extends Issue> issueObjects) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues.longreIndexIssues(IssuesIterable issuesIterable, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a list of issues, passing an optional event that will be set progresslongreIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a list of issues, passing an optional event that will be set progress.longreIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a list of issues, passing an optional event that will be set progress.longreIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a list of issues, passing an optional Context for providing status updates.longreIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) Deprecated, for removal: This API element is subject to removal in a future version.Reindex a set of issues (GenericValues).protected longreIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.voidreindexIssuesBatchMode(Collection<Long> issuesIdsToReindex, Context context, IssueIndexingParams params) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes issues with ids provided withissuesIdsToReindex.longreIndexIssuesInBackground(Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Reindex everything, but don't stop the worldlongreIndexWorklogs(Collection<Worklog> worklogs) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of worklogs.longreIndexWorklogs(Collection<Worklog> worklogs, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of worklogs.longreIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes a collection of worklogs.voidreindexWorklogsInParallel(Collection<Worklog> worklogs, Context context) Deprecated, for removal: This API element is subject to removal in a future version.Reindexes worklogs on multiple threads.longrelease()Deprecated, for removal: This API element is subject to removal in a future version.Release indexing on this thread.voidshutdown()Deprecated, for removal: This API element is subject to removal in a future version.Shuts down the indexing manager and closes its resources (if any).intsize()Deprecated, for removal: This API element is subject to removal in a future version.toString()Deprecated, for removal: This API element is subject to removal in a future version.voidunconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects) Deprecated, for removal: This API element is subject to removal in a future version.Unconditionally updates issues and all related entities indexes: comments, worklogs and changeHistory.booleanwithReindexLock(Runnable runnable) Deprecated, for removal: This API element is subject to removal in a future version.This method takes a runnable that is run under the 'stop the world' reindex lock.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.jira.issue.index.IssueIndexingService
deIndex, deIndexIssueObjects
-
Field Details
-
ANALYZER_FOR_SEARCHING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_SEARCHINGDeprecated, for removal: This API element is subject to removal in a future version. -
ANALYZER_FOR_INDEXING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_INDEXINGDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
IndexManagerBase
public IndexManagerBase(IndexingConfiguration indexProperties, IssueIndexer issueIndexer, IndexPathManager indexPath, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, IssueManager issueManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ArchivingDao archivingDao, SearcherCache searcherCache, TimeTrackingConfiguration timeTrackingConfiguration, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, ArchivingLicenseCheck archivingLicenseCheck, FeatureManager featureManager, IndexConsistencyChecker indexConsistencyChecker) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getAnalyzerForSearching
public org.apache.lucene.analysis.Analyzer getAnalyzerForSearching()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReturns anAnalyzerfor searching.- Specified by:
getAnalyzerForSearchingin interfaceIssueIndexManager- Returns:
- an analyzer for searching
-
getAnalyzerForIndexing
public org.apache.lucene.analysis.Analyzer getAnalyzerForIndexing()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReturns anAnalyzerfor indexing.- Specified by:
getAnalyzerForIndexingin interfaceIssueIndexManager- Returns:
- an analyzer for indexing.
-
deactivate
public void deactivate()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerDe-activates indexing (as happens from the admin page) and removes index directories.- Specified by:
deactivatein interfaceIndexLifecycleManager
-
activate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerActivates search indexes. This will rebuild the indexes.- Specified by:
activatein interfaceIndexLifecycleManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be null.- Returns:
- Reindex time in ms
-
activate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerActivates search indexes.- Specified by:
activatein interfaceIndexLifecycleManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be null.reindex- reindex after activation.- Returns:
- Reindex time in ms
-
isIndexAvailable
public boolean isIndexAvailable()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerWhether this index is available. The index is not available if the index is being rebuilt or recovered. In a clustered environment this reflects only the state on the local node.- Specified by:
isIndexAvailablein interfaceIndexLifecycleManager- Returns:
- Whether this index is available.
-
reIndexAll
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex all issues.- Specified by:
reIndexAllin interfaceIssueIndexingService- Specified by:
reIndexAllin interfaceIssueIndexManager- Returns:
- The number of milliseconds taken to reindex everything, or -1 if not indexing
- Throws:
IndexException
-
reIndexAll
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerReindex everything.- Specified by:
reIndexAllin interfaceIndexLifecycleManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be null.- Returns:
- Reindex time in ms.
-
reIndexAll
Deprecated, for removal: This API element is subject to removal in a future version. -
reIndexAll
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex all issues.- Specified by:
reIndexAllin interfaceIssueIndexingService- Specified by:
reIndexAllin interfaceIssueIndexManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be nulluseBackgroundIndexing- 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.
-
reIndexAll
public long reIndexAll(Context context, boolean useBackgroundIndexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex 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.- Specified by:
reIndexAllin interfaceIssueIndexManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be nulluseBackgroundIndexing- 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.
-
reIndexAll
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerReindex indexes defined by theIssueIndexingParams.- Specified by:
reIndexAllin interfaceIndexLifecycleManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be null.issueIndexingParams- indexes to reindex.- Returns:
- Reindex time in ms.
-
reIndexAll
public long reIndexAll(Context context, boolean useBackgroundIndexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex 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:
reIndexAllin interfaceIssueIndexingService- Specified by:
reIndexAllin interfaceIssueIndexManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be nulluseBackgroundIndexing- 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.
-
withReindexLock
Deprecated, for removal: This API element is subject to removal in a future version.This method takes a runnable that is run under the 'stop the world' reindex lock. It is used here in preference to a Guava function in order to avoid introducing more Guava into the API, which limits our ability to update the library. The runnable is executed in the current thread.- Specified by:
withReindexLockin interfaceIssueIndexManager- Parameters:
runnable- The runnable to be executed- Returns:
- true if the lock was acquired and the runnable was run, false if the lock could not be acquired and the code was not run
-
reIndexAllIssuesInBackground
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerReindex everything, but don't stop the world Comments and change history will not be reindexed.- Specified by:
reIndexAllIssuesInBackgroundin interfaceIndexLifecycleManager- Parameters:
context- used to report progress back to the user or to the logs. Must not be null.- Returns:
- Reindex time in ms.
-
reIndexIssuesInBackground
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerReindex everything, but don't stop the world- Specified by:
reIndexIssuesInBackgroundin interfaceIndexLifecycleManager- Parameters:
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.
-
reIndexIssues
public long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues (GenericValues). UseIssueIndexManager.reIndexIssueObjects(Collection)instead when possible.- Specified by:
reIndexIssuesin interfaceIssueIndexManager- Parameters:
issues- The IssueGenericValues to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssues
protected long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues, IssueIndexingParams issueIndexingParams) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IndexException
-
reIndexIssueObjects
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexingService- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Parameters:
issueObjects- Set ofIssues to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Parameters:
issueObjects- Set ofIssues to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexingService- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Parameters:
issueObjects- Set ofIssues to reindex.issueIndexingParams- Determines witch related objects should be indexed together with issues.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
reIndexIssueObjects
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Parameters:
issueObjects- Set ofIssues 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.
-
reIndexIssueObjects
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexingService- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Parameters:
issueObjects- Set ofIssues 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.
-
deIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceDeindexing issues from a given project- Specified by:
deIndexin interfaceIssueIndexingService- Parameters:
project- project objectshouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndexComments
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceRemove a set of comments from the search index.- Specified by:
deIndexCommentsin interfaceIssueIndexingService- Parameters:
commentsToDeIndex- set ofWithIds to deIndex.shouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndexWorklogs
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceRemove a set of worklogs from the search index.- Specified by:
deIndexWorklogsin interfaceIssueIndexingService- Parameters:
worklogsToDeIndex- set ofWithIds to deIndex.shouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
reIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexingService- Specified by:
reIndexin interfaceIssueIndexManager- Throws:
IndexException
-
reIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexManager
-
reIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexingService- Specified by:
reIndexin interfaceIssueIndexManager
-
reIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexManager- Throws:
IndexException
-
hold
public void hold()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerTemporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.- Specified by:
holdin interfaceIssueIndexingService- Specified by:
holdin interfaceIssueIndexManager
-
isHeld
public boolean isHeld()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReturn true if the index is held on this thread.- Specified by:
isHeldin interfaceIssueIndexingService- Specified by:
isHeldin interfaceIssueIndexManager
-
release
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerRelease indexing on this thread. All queued index requests will be processed.- Specified by:
releasein interfaceIssueIndexingService- Specified by:
releasein interfaceIssueIndexManager- Returns:
- Reindex time in ms.
- Throws:
IndexException- if an error occurs
-
reIndexIssues
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex a list of issues, passing an optional event that will be set progress- Specified by:
reIndexIssuesin interfaceIssueIndexingService- Specified by:
reIndexIssuesin interfaceIssueIndexManager- 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
public long reIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex 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:
reIndexIssuesin interfaceIssueIndexManager- 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
-
reIndexIssues
public long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindex 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:
reIndexIssuesin interfaceIssueIndexingService- Specified by:
reIndexIssuesin interfaceIssueIndexManager- 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.
-
reIndexIssues
public long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams, boolean shouldReplicate) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceReindex 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.- Specified by:
reIndexIssuesin interfaceIssueIndexingService- 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.
-
reIndexComments
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of comments.- Specified by:
reIndexCommentsin interfaceIssueIndexingService- Specified by:
reIndexCommentsin interfaceIssueIndexManager- Parameters:
comments- a collection of Comment- Throws:
IndexException
-
reIndexComments
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of comments.- Specified by:
reIndexCommentsin interfaceIssueIndexingService- Specified by:
reIndexCommentsin interfaceIssueIndexManager- 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
public long reIndexComments(Collection<Comment> comments, Context context, boolean shouldReplicate) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of comments.- Specified by:
reIndexCommentsin interfaceIssueIndexingService- Specified by:
reIndexCommentsin interfaceIssueIndexManager- 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
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of worklogs.- Specified by:
reIndexWorklogsin interfaceIssueIndexingService- Specified by:
reIndexWorklogsin interfaceIssueIndexManager- Parameters:
worklogs- a collection of Worklogs- Throws:
IndexException
-
reIndexWorklogs
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of worklogs.- Specified by:
reIndexWorklogsin interfaceIssueIndexingService- Specified by:
reIndexWorklogsin interfaceIssueIndexManager- 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
public long reIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReindexes a collection of worklogs.- Specified by:
reIndexWorklogsin interfaceIssueIndexingService- Specified by:
reIndexWorklogsin interfaceIssueIndexManager- 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
-
isIndexConsistent
public boolean isIndexConsistent()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isIndexConsistentin interfaceIndexLifecycleManager- Returns:
- the result of a simple consistency check that compares the index state to
the current number of issues. A background re-index should not be attempted
when this returns
false. Note thatfalseis also returned if the index is not available .
-
getLatestIndexDate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGets the latest index date based on the most recent issue updated date.- Specified by:
getLatestIndexDatein interfaceIssueIndexManager- Returns:
- latest index update date or null if no issues in index or no updated value in issues
-
size
public int size()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
sizein interfaceIndexLifecycleManager- Specified by:
sizein interfaceSized- Returns:
- how many Entities will be re-indexed by
IndexLifecycleManager.reIndexAll(Context)
-
isEmpty
public boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version. -
optimize
public long optimize()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerOptimize the underlying indexes. Make the subsequent searching more efficient.- Specified by:
optimizein interfaceIndexLifecycleManager- Returns:
- the amount of time in millis this method took (because you are too lazy to time me), 0 if indexing is not enabled or -1 if we cannot obtain the index writeLock.
-
deIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceRemove an issue from the search index.- Specified by:
deIndexin interfaceIssueIndexingService- Throws:
IndexException
-
deIndexIssueObjectsById
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexingServiceRemove a set of issues from the search index.- Specified by:
deIndexIssueObjectsByIdin interfaceIssueIndexingService- Parameters:
issuesToDelete- set ofWithIds to deIndex.shouldReplicate- whether or not the index changes should be replicated to the other nodes in the cluster.
-
deIndex
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerRemove an issue from the search index.- Specified by:
deIndexin interfaceIssueIndexManager- Throws:
IndexException
-
conditionalUpdateWithVersion
public void 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:InternalIndexingServiceIndex aDocumentconditionally based on the entity id and the version which are resolved byIndexDirectoryFactory.Name.getEntityIdFromDocument(Document)andIndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)- Specified by:
conditionalUpdateWithVersionin interfaceInternalIndexingService- Parameters:
indexName- define the target indexdocument- the document needs to be indexed
-
conditionalUpdateWithVersion
public void 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:InternalIndexingServiceIndex 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:
conditionalUpdateWithVersionin interfaceInternalIndexingService- Parameters:
issueDocument- issue document needs to be indexedcommentDocuments- issue's comment documentschangeHistoryDocuments- issue's history change documentsworklogDocuments- issue's worklog documents
-
unconditionallyReindexIssuesAndRelatedEntitiesLocally
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InternalIndexingServiceUnconditionally updates issues and all related entities indexes: comments, worklogs and changeHistory. For related entities, the existing collection will be fully replaced by the new collection of related entities. Note that this may leave the index in a stale state when there are any other indexing tasks running in parallel. This operation should be followed by a conditional re-index to fix the possibly stale data. This operation may be needed to delete related entities from index by re-indexing an issue. Note that in a cluster this affects only the local index, i.e. this operation will not be replicated to other nodes. To be removed in Jira 9.0. (DBR-242)- Specified by:
unconditionallyReindexIssuesAndRelatedEntitiesLocallyin interfaceInternalIndexingService- Parameters:
issueObjects- issues need to be re-indexed unconditionally locally
-
getPluginsRootPath
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGet 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- Specified by:
getPluginsRootPathin interfaceIssueIndexManager
-
getExistingPluginsPaths
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerReturns 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. SeeIssueIndexManager.getPluginsRootPath().If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.
- Specified by:
getExistingPluginsPathsin interfaceIssueIndexManager
-
getIssueSearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the issue index.- Specified by:
getIssueSearcherin interfaceIssueIndexManager
-
getCommentSearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the comment index.- Specified by:
getCommentSearcherin interfaceIssueIndexManager
-
getChangeHistorySearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the change history index.- Specified by:
getChangeHistorySearcherin interfaceIssueIndexManager
-
getWorklogSearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the worklog index.- Specified by:
getWorklogSearcherin interfaceIssueIndexManager
-
getEntitySearcher
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InternalIndexingServiceGet anIndexSearcherthat can be used to search the index specified by theIndexDirectoryFactory.Name.- Specified by:
getEntitySearcherin interfaceInternalIndexingService- Parameters:
index- Index for which a searcher should be returned
-
reindexIssuesBatchMode
public void reindexIssuesBatchMode(Collection<Long> issuesIdsToReindex, Context context, IssueIndexingParams params) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InternalIndexingServiceReindexes issues with ids provided withissuesIdsToReindex. Like foreground reindex will perform the reindex operations under index write lock and on multiple threads. The lock is needed because of 2 reasons: - the updates are not conditional (so we could overwrite newer concurrent update) - multithreading could saturate the indexer.- Specified by:
reindexIssuesBatchModein interfaceInternalIndexingService- Parameters:
issuesIdsToReindex- ids specifying which issues to reindex.context- used to report progress back to the user or to the logs.params- determines witch related objects should be indexed together with issues.- Throws:
IndexException- in case the lock couldn't be acquired.
-
reindexCommentsInParallel
public void reindexCommentsInParallel(Collection<Comment> comments, Context context) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InternalIndexingServiceReindexes comments on multiple threads. Performs the operation under index write lock The lock is needed because of 2 reasons: - the updates are not conditional (so we could overwrite newer concurrent update) - multithreading could saturate the indexer.- Specified by:
reindexCommentsInParallelin interfaceInternalIndexingService- Parameters:
comments- comments to reindexcontext- used to report progress back to the user or to the logs.- Throws:
IndexException- in case the lock couldn't be acquired.
-
reindexWorklogsInParallel
public void reindexWorklogsInParallel(Collection<Worklog> worklogs, Context context) throws IndexException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InternalIndexingServiceReindexes worklogs on multiple threads. Performs the operation under index write lock The lock is needed because of 2 reasons: - the updates are not conditional (so we could overwrite newer concurrent update) - multithreading could saturate the indexer.- Specified by:
reindexWorklogsInParallelin interfaceInternalIndexingService- Parameters:
worklogs- worklogs to reindexcontext- used to report progress back to the user or to the logs.- Throws:
IndexException- in case the lock couldn't be acquired.
-
getAllIndexPaths
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getAllIndexPathsin interfaceIndexLifecycleManager- Returns:
- a collection of Strings that map to all paths that contain Lucene indexes. Must not be null.
-
shutdown
public void shutdown()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IndexLifecycleManagerShuts down the indexing manager and closes its resources (if any).- Specified by:
shutdownin interfaceIndexLifecycleManager- Specified by:
shutdownin interfaceShutdown
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.
-