public class DefaultIndexManager extends Object implements IssueIndexManager, InternalIndexingService
Modifier and Type | Field and Description |
---|---|
static org.apache.lucene.analysis.Analyzer |
ANALYZER_FOR_INDEXING |
static org.apache.lucene.analysis.Analyzer |
ANALYZER_FOR_SEARCHING |
Constructor and Description |
---|
DefaultIndexManager(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) |
Modifier and Type | Method and Description |
---|---|
long |
activate(Context context)
Activates search indexes.
|
long |
activate(Context context,
boolean reindex)
Activates search indexes.
|
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)
Index an issue document with its related documents conditionally based on the entity ids and the versions
which are resolved by
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document) and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document) |
void |
conditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName,
org.apache.lucene.document.Document document)
Index a
Document conditionally based on the entity id and the version which are resolved by
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document) and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document) |
void |
deactivate()
De-activates indexing (as happens from the admin page) and removes index directories.
|
void |
deIndex(org.ofbiz.core.entity.GenericValue entity)
Remove an issue from the search index.
|
void |
deIndex(Project project,
boolean shouldReplicate)
Deindexing issues from a given project
|
void |
deIndex(WithId issueWithId)
Remove an issue from the search index.
|
void |
deIndexComments(Set<WithId> commentsToDeIndex,
boolean shouldReplicate)
Remove a set of comments from the search index.
|
void |
deIndexIssueObjectsById(Set<? extends WithId> issuesToDelete,
boolean shouldReplicate)
Remove a set of issues from the search index.
|
void |
deIndexWorklogs(Set<WithId> worklogsToDeIndex,
boolean shouldReplicate)
Remove a set of worklogs from the search index.
|
Collection<String> |
getAllIndexPaths() |
org.apache.lucene.analysis.Analyzer |
getAnalyzerForIndexing()
Returns an
Analyzer for indexing. |
org.apache.lucene.analysis.Analyzer |
getAnalyzerForSearching()
Returns an
Analyzer for searching. |
ManagedIndexSearcher |
getChangeHistorySearcher()
Get an
IndexSearcher that can be used to search the change history index. |
ManagedIndexSearcher |
getCommentSearcher()
Get an
IndexSearcher that can be used to search the comment index. |
ManagedIndexSearcher |
getEntitySearcher(IndexDirectoryFactory.Name index)
Get an
IndexSearcher that can be used to search the index specified
by the IndexDirectoryFactory.Name . |
List<String> |
getExistingPluginsPaths()
Returns a collection of Strings, each one representing the absolute path to the actual existing directory
where a plugin keeps its indexes.
|
ManagedIndexSearcher |
getIssueSearcher()
Get an
IndexSearcher that can be used to search the issue index. |
java.time.Instant |
getLatestIndexDate()
Gets the latest index date based on the most recent issue updated date.
|
String |
getPluginsRootPath()
Get the root path of the index directory for plugins.
|
ManagedIndexSearcher |
getWorklogSearcher()
Get an
IndexSearcher that can be used to search the worklog index. |
void |
hold()
Temporarily suspend indexing on this thread.
|
boolean |
isEmpty() |
boolean |
isHeld()
Return true if the index is held.
|
boolean |
isIndexAvailable()
Whether this index is available.
|
boolean |
isIndexConsistent() |
long |
optimize()
Optimize the underlying indexes.
|
void |
reIndex(org.ofbiz.core.entity.GenericValue issueGV)
Reindex an issue (eg.
|
void |
reIndex(Issue issue)
Reindex an issue (eg.
|
void |
reIndex(Issue issue,
boolean reIndexComments,
boolean reIndexChangeHistory)
Reindex an issue (eg.
|
void |
reIndex(Issue issue,
IssueIndexingParams issueIndexingParams)
Reindex an issue (eg.
|
long |
reIndexAll()
Reindex all issues.
|
long |
reIndexAll(Context context)
Reindex everything.
|
long |
reIndexAll(Context context,
boolean useBackgroundIndexing) |
long |
reIndexAll(Context context,
boolean useBackgroundIndexing,
boolean notifyCluster)
Reindex all issues.
|
long |
reIndexAll(Context context,
boolean useBackgroundIndexing,
boolean reIndexComments,
boolean reIndexChangeHistory,
boolean notifyCluster)
Reindex all issues.
|
long |
reIndexAll(Context context,
boolean useBackgroundIndexing,
IssueIndexingParams issueIndexingParams,
boolean notifyCluster)
Reindex all issues.
|
long |
reIndexAll(Context context,
IssueIndexingParams issueIndexingParams)
Reindex indexes defined by the
IssueIndexingParams . |
long |
reIndexAllIssuesInBackground(Context context)
Reindex everything, but don't stop the world
Comments and change history will not be reindexed.
|
long |
reIndexComments(Collection<Comment> comments)
Reindexes a collection of comments.
|
long |
reIndexComments(Collection<Comment> comments,
Context context)
Reindexes a collection of comments.
|
long |
reIndexComments(Collection<Comment> comments,
Context context,
boolean shouldReplicate)
Reindexes a collection of comments.
|
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects)
Reindex a set of issues.
|
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects,
boolean reIndexComments,
boolean reIndexChangeHistory)
Reindex a set of issues.
|
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects,
boolean reIndexComments,
boolean reIndexChangeHistory,
boolean shouldReplicate)
Reindex a set of issues.
|
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects,
IssueIndexingParams issueIndexingParams)
Reindex a set of issues.
|
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects,
IssueIndexingParams issueIndexingParams,
boolean shouldReplicate)
Reindex a set of issues.
|
long |
reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues)
Reindex a set of issues (GenericValues).
|
protected long |
reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues,
IssueIndexingParams issueIndexingParams) |
long |
reIndexIssues(IssuesIterable issuesIterable,
Context context)
Reindex a list of issues, passing an optional event that will be set progress
|
long |
reIndexIssues(IssuesIterable issuesIterable,
Context context,
boolean reIndexComments,
boolean reIndexChangeHistory)
Reindex a list of issues, passing an optional event that will be set progress.
|
long |
reIndexIssues(IssuesIterable issuesIterable,
Context context,
IssueIndexingParams issueIndexingParams)
Reindex a list of issues, passing an optional event that will be set progress.
|
long |
reIndexIssues(IssuesIterable issuesIterable,
Context context,
IssueIndexingParams issueIndexingParams,
boolean shouldReplicate)
Reindex a list of issues, passing an optional Context for providing status updates.
|
void |
reindexIssuesBatchMode(Collection<Long> issuesIdsToReindex,
Context context,
IssueIndexingParams params)
Reindexes issues with ids provided with
issuesIdsToReindex . |
long |
reIndexIssuesInBackground(Context context,
IssueIndexingParams issueIndexingParams)
Reindex everything, but don't stop the world
|
long |
reIndexWorklogs(Collection<Worklog> worklogs)
Reindexes a collection of worklogs.
|
long |
reIndexWorklogs(Collection<Worklog> worklogs,
Context context)
Reindexes a collection of worklogs.
|
long |
reIndexWorklogs(Collection<Worklog> worklogs,
Context context,
boolean shouldReplicate)
Reindexes a collection of worklogs.
|
long |
release()
Release indexing on this thread.
|
void |
shutdown()
Shuts down the indexing manager and closes its resources (if any).
|
int |
size() |
String |
toString() |
void |
unconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects)
Unconditionally updates issues and all related entities indexes: comments, worklogs and changeHistory.
|
boolean |
withReindexLock(Runnable runnable)
This method takes a runnable that is run under the 'stop the world' reindex lock.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
deIndex, deIndexIssueObjects
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_SEARCHING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_INDEXING
public DefaultIndexManager(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)
public org.apache.lucene.analysis.Analyzer getAnalyzerForSearching()
IssueIndexManager
Analyzer
for searching.getAnalyzerForSearching
in interface IssueIndexManager
public org.apache.lucene.analysis.Analyzer getAnalyzerForIndexing()
IssueIndexManager
Analyzer
for indexing.getAnalyzerForIndexing
in interface IssueIndexManager
public void deactivate()
IndexLifecycleManager
deactivate
in interface IndexLifecycleManager
public long activate(Context context)
IndexLifecycleManager
activate
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.public long activate(Context context, boolean reindex)
IndexLifecycleManager
activate
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.reindex
- reindex after activation.public boolean isIndexAvailable()
IndexLifecycleManager
isIndexAvailable
in interface IndexLifecycleManager
public long reIndexAll() throws IndexException
IssueIndexManager
reIndexAll
in interface IssueIndexingService
reIndexAll
in interface IssueIndexManager
IndexException
public long reIndexAll(Context context)
IndexLifecycleManager
reIndexAll
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.public long reIndexAll(Context context, boolean useBackgroundIndexing)
public long reIndexAll(Context context, boolean useBackgroundIndexing, boolean notifyCluster)
IssueIndexManager
reIndexAll
in interface IssueIndexingService
reIndexAll
in interface IssueIndexManager
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 allpublic long reIndexAll(Context context, boolean useBackgroundIndexing, boolean reIndexComments, boolean reIndexChangeHistory, boolean notifyCluster)
IssueIndexManager
reIndexAll
in interface IssueIndexManager
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 allpublic long reIndexAll(Context context, IssueIndexingParams issueIndexingParams)
IndexLifecycleManager
IssueIndexingParams
.reIndexAll
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.issueIndexingParams
- indexes to reindex.public long reIndexAll(Context context, boolean useBackgroundIndexing, IssueIndexingParams issueIndexingParams, boolean notifyCluster)
IssueIndexManager
reIndexAll
in interface IssueIndexingService
reIndexAll
in interface IssueIndexManager
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 allpublic boolean withReindexLock(Runnable runnable)
withReindexLock
in interface IssueIndexManager
runnable
- The runnable to be executedpublic long reIndexAllIssuesInBackground(Context context)
IndexLifecycleManager
reIndexAllIssuesInBackground
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.public long reIndexIssuesInBackground(Context context, IssueIndexingParams issueIndexingParams)
IndexLifecycleManager
reIndexIssuesInBackground
in interface IndexLifecycleManager
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.public long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) throws IndexException
IssueIndexManager
IssueIndexManager.reIndexIssueObjects(Collection)
instead when possible.reIndexIssues
in interface IssueIndexManager
issues
- The Issue GenericValue
s to reindex.IndexException
protected long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues, IssueIndexingParams issueIndexingParams) throws IndexException
IndexException
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects) throws IndexException
IssueIndexManager
reIndexIssueObjects
in interface IssueIndexingService
reIndexIssueObjects
in interface IssueIndexManager
issueObjects
- Set of Issue
s to reindex.IndexException
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException
IssueIndexManager
reIndexIssueObjects
in interface IssueIndexManager
issueObjects
- Set of Issue
s to reindex.IndexException
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams) throws IndexException
IssueIndexManager
reIndexIssueObjects
in interface IssueIndexingService
reIndexIssueObjects
in interface IssueIndexManager
issueObjects
- Set of Issue
s to reindex.issueIndexingParams
- Determines witch related objects should be indexed together with issues.IndexException
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, boolean reIndexComments, boolean reIndexChangeHistory, boolean shouldReplicate)
IssueIndexManager
reIndexIssueObjects
in interface IssueIndexManager
issueObjects
- Set of Issue
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.public long reIndexIssueObjects(Collection<? extends Issue> issueObjects, IssueIndexingParams issueIndexingParams, boolean shouldReplicate)
IssueIndexManager
reIndexIssueObjects
in interface IssueIndexingService
reIndexIssueObjects
in interface IssueIndexManager
issueObjects
- Set of Issue
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.public void deIndex(Project project, boolean shouldReplicate)
IssueIndexingService
deIndex
in interface IssueIndexingService
project
- project objectshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public void deIndexComments(Set<WithId> commentsToDeIndex, boolean shouldReplicate)
IssueIndexingService
deIndexComments
in interface IssueIndexingService
commentsToDeIndex
- set of WithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public void deIndexWorklogs(Set<WithId> worklogsToDeIndex, boolean shouldReplicate)
IssueIndexingService
deIndexWorklogs
in interface IssueIndexingService
worklogsToDeIndex
- set of WithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public void reIndex(Issue issue) throws IndexException
IssueIndexManager
reIndex
in interface IssueIndexingService
reIndex
in interface IssueIndexManager
IndexException
public void reIndex(Issue issue, boolean reIndexComments, boolean reIndexChangeHistory)
IssueIndexManager
reIndex
in interface IssueIndexManager
public void reIndex(Issue issue, IssueIndexingParams issueIndexingParams)
IssueIndexManager
reIndex
in interface IssueIndexingService
reIndex
in interface IssueIndexManager
public void reIndex(org.ofbiz.core.entity.GenericValue issueGV) throws IndexException
IssueIndexManager
reIndex
in interface IssueIndexManager
IndexException
public void hold()
IssueIndexManager
hold
in interface IssueIndexManager
public boolean isHeld()
IssueIndexManager
isHeld
in interface IssueIndexManager
public long release() throws IndexException
IssueIndexManager
release
in interface IssueIndexManager
IndexException
- if an error occurspublic long reIndexIssues(IssuesIterable issuesIterable, Context context) throws IndexException
IssueIndexManager
reIndexIssues
in interface IssueIndexingService
reIndexIssues
in interface IssueIndexManager
issuesIterable
- IssuesIterablecontext
- used to report progress back to the user or to the logs. Must not be null.IndexException
public long reIndexIssues(IssuesIterable issuesIterable, Context context, boolean reIndexComments, boolean reIndexChangeHistory) throws IndexException
IssueIndexManager
reIndexIssues
in interface IssueIndexManager
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 historyIndexException
public long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams)
IssueIndexManager
reIndexIssues
in interface IssueIndexingService
reIndexIssues
in interface IssueIndexManager
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.public long reIndexIssues(IssuesIterable issuesIterable, Context context, IssueIndexingParams issueIndexingParams, boolean shouldReplicate)
IssueIndexingService
reIndexIssues
in interface IssueIndexingService
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.public long reIndexComments(Collection<Comment> comments) throws IndexException
IssueIndexManager
reIndexComments
in interface IssueIndexingService
reIndexComments
in interface IssueIndexManager
comments
- a collection of CommentIndexException
public long reIndexComments(Collection<Comment> comments, Context context) throws IndexException
IssueIndexManager
reIndexComments
in interface IssueIndexingService
reIndexComments
in interface IssueIndexManager
comments
- a collection of Commentcontext
- used to report progress back to the user or to the logs. Must not be null.IndexException
public long reIndexComments(Collection<Comment> comments, Context context, boolean shouldReplicate) throws IndexException
IssueIndexManager
reIndexComments
in interface IssueIndexingService
reIndexComments
in interface IssueIndexManager
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.IndexException
public long reIndexWorklogs(Collection<Worklog> worklogs) throws IndexException
IssueIndexManager
reIndexWorklogs
in interface IssueIndexingService
reIndexWorklogs
in interface IssueIndexManager
worklogs
- a collection of WorklogsIndexException
public long reIndexWorklogs(Collection<Worklog> worklogs, Context context) throws IndexException
IssueIndexManager
reIndexWorklogs
in interface IssueIndexingService
reIndexWorklogs
in interface IssueIndexManager
worklogs
- a collection of Worklogscontext
- used to report progress back to the user or to the logs. Must not be null.IndexException
public long reIndexWorklogs(Collection<Worklog> worklogs, Context context, boolean shouldReplicate) throws IndexException
IssueIndexManager
reIndexWorklogs
in interface IssueIndexingService
reIndexWorklogs
in interface IssueIndexManager
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.IndexException
public boolean isIndexConsistent()
isIndexConsistent
in interface IndexLifecycleManager
false
. Note that false
is also returned if the index
is not available IndexLifecycleManager.isIndexAvailable()
.public java.time.Instant getLatestIndexDate()
IssueIndexManager
getLatestIndexDate
in interface IssueIndexManager
public int size()
size
in interface Sized
size
in interface IndexLifecycleManager
IndexLifecycleManager.reIndexAll(Context)
public long optimize()
IndexLifecycleManager
optimize
in interface IndexLifecycleManager
public void deIndex(WithId issueWithId) throws IndexException
IssueIndexingService
deIndex
in interface IssueIndexingService
IndexException
public void deIndexIssueObjectsById(Set<? extends WithId> issuesToDelete, boolean shouldReplicate)
IssueIndexingService
deIndexIssueObjectsById
in interface IssueIndexingService
issuesToDelete
- set of WithId
s to deIndex.shouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public void deIndex(org.ofbiz.core.entity.GenericValue entity) throws IndexException
IssueIndexManager
deIndex
in interface IssueIndexManager
IndexException
public void conditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document)
InternalIndexingService
Document
conditionally based on the entity id and the version which are resolved by
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
conditionalUpdateWithVersion
in interface InternalIndexingService
indexName
- define the target indexdocument
- the document needs to be indexedpublic 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)
InternalIndexingService
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
conditionalUpdateWithVersion
in interface InternalIndexingService
issueDocument
- issue document needs to be indexedcommentDocuments
- issue's comment documentschangeHistoryDocuments
- issue's history change documentsworklogDocuments
- issue's worklog documentspublic void unconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects)
InternalIndexingService
unconditionallyReindexIssuesAndRelatedEntitiesLocally
in interface InternalIndexingService
issueObjects
- issues need to be re-indexed unconditionally locallypublic String getPluginsRootPath()
IssueIndexManager
getPluginsRootPath
in interface IssueIndexManager
public List<String> getExistingPluginsPaths()
IssueIndexManager
IssueIndexManager.getPluginsRootPath()
.
If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.
getExistingPluginsPaths
in interface IssueIndexManager
public ManagedIndexSearcher getIssueSearcher()
IssueIndexManager
IndexSearcher
that can be used to search the issue index.getIssueSearcher
in interface IssueIndexManager
public ManagedIndexSearcher getCommentSearcher()
IssueIndexManager
IndexSearcher
that can be used to search the comment index.getCommentSearcher
in interface IssueIndexManager
public ManagedIndexSearcher getChangeHistorySearcher()
IssueIndexManager
IndexSearcher
that can be used to search the change history index.getChangeHistorySearcher
in interface IssueIndexManager
public ManagedIndexSearcher getWorklogSearcher()
IssueIndexManager
IndexSearcher
that can be used to search the worklog index.getWorklogSearcher
in interface IssueIndexManager
public ManagedIndexSearcher getEntitySearcher(IndexDirectoryFactory.Name index)
InternalIndexingService
IndexSearcher
that can be used to search the index specified
by the IndexDirectoryFactory.Name
.getEntitySearcher
in interface InternalIndexingService
index
- Index for which a searcher should be returnedpublic void reindexIssuesBatchMode(Collection<Long> issuesIdsToReindex, Context context, IssueIndexingParams params) throws IndexException
InternalIndexingService
issuesIdsToReindex
.
Like foreground reindex this will perform the reindex operations under index write lock
and in 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.reindexIssuesBatchMode
in interface InternalIndexingService
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.IndexException
- in case the lock couldn't be acquired.public Collection<String> getAllIndexPaths()
getAllIndexPaths
in interface IndexLifecycleManager
public void shutdown()
IndexLifecycleManager
shutdown
in interface IndexLifecycleManager
shutdown
in interface Shutdown
Copyright © 2002-2024 Atlassian. All Rights Reserved.