public interface InternalIndexingService
Modifier and Type | Method and Description |
---|---|
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) |
ManagedIndexSearcher |
getEntitySearcher(IndexDirectoryFactory.Name index)
Get an
IndexSearcher that can be used to search the index specified
by the IndexDirectoryFactory.Name . |
void |
reindexIssuesBatchMode(Collection<Long> issuesIdsToReindex,
Context context,
IssueIndexingParams params)
Reindexes issues with ids provided with
issuesIdsToReindex . |
void |
unconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects)
Unconditionally updates issues and all related entities indexes: comments, worklogs and changeHistory.
|
void conditionalUpdateWithVersion(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document)
Document
conditionally based on the entity id and the version which are resolved by
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
indexName
- define the target indexdocument
- the document needs to be indexedvoid 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)
IndexDirectoryFactory.Name.getEntityIdFromDocument(Document)
and
IndexDirectoryFactory.Name.getEntityVersionFromDocument(Document)
issueDocument
- issue document needs to be indexedcommentDocuments
- issue's comment documentschangeHistoryDocuments
- issue's history change documentsworklogDocuments
- issue's worklog documents@Internal void unconditionallyReindexIssuesAndRelatedEntitiesLocally(Collection<Issue> issueObjects)
issueObjects
- issues need to be re-indexed unconditionally locallyManagedIndexSearcher getEntitySearcher(IndexDirectoryFactory.Name index)
IndexSearcher
that can be used to search the index specified
by the IndexDirectoryFactory.Name
.index
- Index for which a searcher should be returnedvoid reindexIssuesBatchMode(Collection<Long> issuesIdsToReindex, Context context, IssueIndexingParams params) throws IndexException
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.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.Copyright © 2002-2023 Atlassian. All Rights Reserved.