Class OpenSearchJiraIndexManager
java.lang.Object
com.atlassian.jira.search.opensearch.OpenSearchIssueIndexManager
com.atlassian.jira.search.opensearch.OpenSearchJiraIndexManager
- All Implemented Interfaces:
InternalIndexingService,IssueIndexingService,IssueIndexManager,JiraIndexManager,IndexSearcherProvider,Sized,IndexLifecycleManager,Shutdown
@Internal
@Deprecated
public class OpenSearchJiraIndexManager
extends OpenSearchIssueIndexManager
implements JiraIndexManager
Deprecated.
since 11.0
OpenSearchJiraIndexManager is a temporary workaround until all usages of the deprecated interfaces JiraIndexManager,
IssueIndexManager and InternalIndexingService are replaced with Search API alternatives such as IndexLifecycleManager
and IssueIndexingService.
It is registered with Spring when the Search Platform is OpenSearch to prevent dependency resolution errors on startup
where the deprecated interfaces are still used.
When Lucene is the search platform, the OpenSearchJiraIndexManager is not registered and the deprecated interfaces are
provided by DefaultIndexManager.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchJiraIndexManager(IndexingConfiguration indexProperties, IssueIndexer issueIndexer, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, IssueManager issueManager, ArchivingDao archivingDao, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, IndexConsistencyChecker indexConsistencyChecker, ReindexStrategy reindexStrategy) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidconditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) Deprecated.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.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)voiddeIndex(org.ofbiz.core.entity.GenericValue issue) Deprecated.Remove an issue from the search index.org.apache.lucene.analysis.AnalyzerDeprecated.Returns anAnalyzerfor indexing.org.apache.lucene.analysis.AnalyzerDeprecated.Returns anAnalyzerfor searching.Deprecated.Get anIndexSearcherthat can be used to search the change history index.Deprecated.Get anIndexSearcherthat can be used to search the comment index.Deprecated.Get anIndexSearcherthat can be used to search the index specified by theIndexDirectoryFactory.Name.Deprecated.Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes.Deprecated.Get anIndexSearcherthat can be used to search the issue index.Deprecated.Get the root path of the index directory for plugins.Deprecated.Get anIndexSearcherthat can be used to search the worklog index.voidDeprecated.Reindex an issue (eg.voidreIndex(org.ofbiz.core.entity.GenericValue issue) Deprecated.Reindex an issue (eg.longreIndexAll(Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) Deprecated.Reindex all issues.voidreindexCommentsInParallel(Collection<Comment> comments, Context context) Deprecated.Reindexes comments on multiple threads.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated.Reindex a set of issues.longreIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) Deprecated.Reindex a set of issues.longreIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) Deprecated.Reindex a list of issues, passing an optional event that will be set progress.longreIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) Deprecated.Reindex a set of issues (GenericValues).voidreindexIssuesBatchMode(Collection<Long> issuesIdsToReindex, Context context, IssueIndexingParams params) Deprecated.Reindexes issues with ids provided withissuesIdsToReindex.voidreindexWorklogsInParallel(Collection<Worklog> worklogs, Context context) Deprecated.Reindexes worklogs on multiple threads.voidunconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects) Deprecated.Unconditionally updates issues and all related entities indexes: comments, worklogs and changeHistory.booleanwithReindexLock(Runnable runnable) Deprecated.There is no reindex lock for OpenSearch since it re-indexes in a blue/green fashion remaining online throughout the reindex.Methods inherited from class com.atlassian.jira.search.opensearch.OpenSearchIssueIndexManager
activate, activate, deactivate, deIndex, deIndex, deIndexComments, deIndexIssueObjectsById, deIndexWorklogs, getAllIndexPaths, getLatestIndexDate, hold, isEmpty, isHeld, isIndexAvailable, isIndexConsistent, optimize, reIndex, reIndex, reIndexAll, reIndexAll, reIndexAll, reIndexAll, reIndexAll, reIndexAllIssuesInBackground, reIndexComments, reIndexComments, reIndexComments, reIndexIssueObjects, reIndexIssueObjects, reIndexIssueObjects, reIndexIssues, reIndexIssues, reIndexIssues, reIndexIssuesInBackground, reIndexWorklogs, reIndexWorklogs, reIndexWorklogs, release, shutdown, size, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.jira.util.index.IndexLifecycleManager
activate, activate, deactivate, getAllIndexPaths, isIndexAvailable, isIndexConsistent, optimize, reIndexAll, reIndexAll, reIndexAllIssuesInBackground, reIndexIssuesInBackground, shutdown, sizeMethods inherited from interface com.atlassian.jira.issue.index.IssueIndexingService
deIndex, deIndex, deIndex, deIndexComments, deIndexIssueObjects, deIndexIssueObjectsById, deIndexWorklogs, reIndexIssuesMethods inherited from interface com.atlassian.jira.issue.index.IssueIndexManager
getLatestIndexDate, hold, isHeld, reIndex, reIndex, reIndexAll, reIndexAll, reIndexAll, reIndexComments, reIndexComments, reIndexComments, reIndexIssueObjects, reIndexIssueObjects, reIndexIssueObjects, reIndexIssues, reIndexIssues, reIndexWorklogs, reIndexWorklogs, reIndexWorklogs, releaseMethods inherited from interface com.atlassian.jira.issue.index.JiraIndexManager
get
-
Constructor Details
-
OpenSearchJiraIndexManager
public OpenSearchJiraIndexManager(IndexingConfiguration indexProperties, IssueIndexer issueIndexer, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, IssueManager issueManager, ArchivingDao archivingDao, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, IndexConsistencyChecker indexConsistencyChecker, ReindexStrategy reindexStrategy) Deprecated.
-
-
Method Details
-
conditionalUpdateWithVersion
public void conditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) Deprecated.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.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.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
-
getEntitySearcher
Deprecated.Description copied from interface:InternalIndexingServiceGet anIndexSearcherthat can be used to search the index specified by theIndexDirectoryFactory.Name. This is specific to Lucene search platform, useIndexAccessorRegistryto get a platform-agnosticIndexSearcherinstead.- 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.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.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.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.
-
getPluginsRootPath
Deprecated.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.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.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the issue index. This is specific to Lucene search platform, useIndexAccessorRegistryto get a platform-agnosticIndexSearcherinstead.- Specified by:
getIssueSearcherin interfaceIssueIndexManager
-
getCommentSearcher
Deprecated.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the comment index. This is specific to Lucene search platform, useIndexAccessorRegistryto get a platform-agnosticIndexSearcherinstead.- Specified by:
getCommentSearcherin interfaceIssueIndexManager
-
getChangeHistorySearcher
Deprecated.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the change history index. This is specific to Lucene search platform, useIndexAccessorRegistryto get a platform-agnosticIndexSearcherinstead.- Specified by:
getChangeHistorySearcherin interfaceIssueIndexManager
-
getWorklogSearcher
Deprecated.Description copied from interface:IssueIndexManagerGet anIndexSearcherthat can be used to search the worklog index. This is specific to Lucene search platform, useIndexAccessorRegistryto get a platform-agnosticIndexSearcherinstead.- Specified by:
getWorklogSearcherin interfaceIssueIndexManager
-
getAnalyzerForSearching
public org.apache.lucene.analysis.Analyzer getAnalyzerForSearching()Deprecated.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.Description copied from interface:IssueIndexManagerReturns anAnalyzerfor indexing.- Specified by:
getAnalyzerForIndexingin interfaceIssueIndexManager- Returns:
- an analyzer for indexing.
-
reIndexAll
public long reIndexAll(Context context, boolean useBackgroundReindexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster) throws IndexException Deprecated.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 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
-
reIndex
Deprecated.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexManager- Throws:
IndexException
-
reIndexIssues
public long reIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.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
-
reIndex
public void reIndex(Issue issue, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexManager- Throws:
IndexException
-
deIndex
Deprecated.Description copied from interface:IssueIndexManagerRemove an issue from the search index.- Specified by:
deIndexin interfaceIssueIndexManager- Throws:
IndexException
-
reIndexIssues
public long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) throws IndexException Deprecated.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
-
reIndexIssueObjects
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException Deprecated.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, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate) throws IndexException Deprecated.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.
- Throws:
IndexException
-
withReindexLock
Deprecated.There is no reindex lock for OpenSearch since it re-indexes in a blue/green fashion remaining online throughout the reindex.- Specified by:
withReindexLockin interfaceIssueIndexManager- Parameters:
runnable- the runnable to execute- Returns:
- true if the lock could be acquired, false otherwise
- Throws:
UnsupportedOperationException- operation is not supported on Lucene
-