Class DefaultIssueIndexer

java.lang.Object
com.atlassian.jira.issue.index.DefaultIssueIndexer
All Implemented Interfaces:
BackupContributor, IssueIndexer, UnmanagedIndexSearcherProvider

@Deprecated(since="10.4", forRemoval=true) public class DefaultIssueIndexer extends Object implements IssueIndexer
Deprecated, for removal: This API element is subject to removal in a future version.
since 10.4, replaced by OpenSearchIssueIndexer
A legacy implementation of IssueIndexer for Lucene
  • Constructor Details

  • Method Details

    • getNumberOfIndexingThreads

      public int getNumberOfIndexingThreads()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deindexIssues

      public Index.Result deindexIssues(@Nonnull Collection<? extends WithId> issues, @Nonnull Context context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIds
      Specified by:
      deindexIssues in interface IssueIndexer
      Parameters:
      issues - An iterable of WithIds for the Issues to de-index.
      context - for showing the user the current status.
    • deindexIssues

      public Index.Result deindexIssues(@Nonnull Collection<? extends WithId> issues, @Nonnull Context context, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Delete any existing documents (in the issue index & all related entity indexes) for the Issues represented by the supplied WithIds
      Specified by:
      deindexIssues in interface IssueIndexer
      Parameters:
      issues - An iterable of WithIds for the Issues to de-index.
      context - for showing the user the current status.
      shouldReplicate - whether the index changes should be replicated to the other nodes in the cluster.
    • deIndexProject

      public Index.Result deIndexProject(Project project, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Remove all documents connected with given project
      Specified by:
      deIndexProject in interface IssueIndexer
      Parameters:
      project - project object
    • indexIssues

      public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Add documents for the supplied issues.
      Specified by:
      indexIssues in interface IssueIndexer
      Parameters:
      issues - An iterable of issues to index.
      context - for showing the user the current status.
      issueIndexingParams - parameters describing what should be reindexed
    • indexIssuesBatchMode

      public AccumulatingResultBuilder indexIssuesBatchMode(@Nonnull IssuesBatcher batcher, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams)
      Deprecated, for removal: This API element is subject to removal in a future version.
      No other index operations should be called while this method is being called
      Specified by:
      indexIssuesBatchMode in interface IssueIndexer
      Parameters:
      batcher - An iterable over issue batches.
      context - for showing the user the current status.
      issueIndexingParams - parameters describing what should be reindexed
    • reindexIssuesBatchMode

      public AccumulatingResultBuilder reindexIssuesBatchMode(@Nonnull IssuesBatcher batcher, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams)
      Deprecated, for removal: This API element is subject to removal in a future version.
      No other index operations should be called while this method is being called
      Specified by:
      reindexIssuesBatchMode in interface IssueIndexer
      Parameters:
      batcher - an iterable over issue batches.
      context - for showing the user the current status.
      issueIndexingParams - parameters describing what should be reindexed
    • reindexIssues

      public Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams, boolean conditionalUpdate, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Re-index the given issues, delete any existing documents and add new ones.
      Specified by:
      reindexIssues in interface IssueIndexer
      Parameters:
      issues - An iterable of issues to index.
      context - for showing the user the current status.
      issueIndexingParams - parameters describing what should be reindexed
      conditionalUpdate - set to true to use conditional updates when writing to the index
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.
    • reindexComments

      public Index.Result reindexComments(@Nonnull Collection<Comment> comments, @Nonnull Context context, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Reindex a collection of issue comments.
      Specified by:
      reindexComments in interface IssueIndexer
      Parameters:
      comments - Comments to be reindexed.
      context - for showing the user the current status.
      shouldReplicate - whether or not the index changes should be replicated to the other nodes in the cluster.
    • reindexCommentsInParallel

      public Index.Result reindexCommentsInParallel(@Nonnull Collection<Comment> comments, @Nonnull Context context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Reindex a collection of issue comments on multiple threads. This will not replicate the comments to the other nodes in cluster. As this method does not use conditional updates, it must be executed under index write lock.
      Specified by:
      reindexCommentsInParallel in interface IssueIndexer
      Parameters:
      comments - Comments to be reindexed.
      context - for showing the user the current status.
    • reindexWorklogsInParallel

      public Index.Result reindexWorklogsInParallel(@Nonnull Collection<Worklog> worklogs, @Nonnull Context context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Reindex a collection of issue worklogs on multiple threads. This will not replicate the worklogs to the other nodes in cluster. As this method does not use conditional updates, it must be executed under index write lock.
      Specified by:
      reindexWorklogsInParallel in interface IssueIndexer
      Parameters:
      worklogs - Worklogs to be reindexed.
      context - for showing the user the current status.
    • reindexWorklogs

      public Index.Result reindexWorklogs(@Nonnull Collection<Worklog> worklogs, @Nonnull Context context, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      reindexWorklogs in interface IssueIndexer
    • deindexComments

      public Index.Result deindexComments(@Nonnull Collection<? extends WithId> comments, @Nonnull Context context, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      deindexComments in interface IssueIndexer
    • deindexWorklogs

      public Index.Result deindexWorklogs(@Nonnull Collection<? extends WithId> worklogs, @Nonnull Context context, boolean shouldReplicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      deindexWorklogs in interface IssueIndexer
    • conditionalUpdateWithVersion

      public Index.Result 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: IssueIndexer
      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)
      Specified by:
      conditionalUpdateWithVersion in interface IssueIndexer
      Parameters:
      indexName - define the target index
      document - the document needs to be indexed
    • conditionalUpdateWithVersion

      public Index.Result 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: IssueIndexer
      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)
      Specified by:
      conditionalUpdateWithVersion in interface IssueIndexer
      Parameters:
      issueDocument - issue document needs to be indexed
      commentDocuments - issue's comment documents
      changeHistoryDocuments - issue's history change documents
      worklogDocuments - issue's worklog documents
    • deleteIndexes

      public void deleteIndexes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Delete all indexes.
      Specified by:
      deleteIndexes in interface IssueIndexer
    • deleteIndexes

      public void deleteIndexes(@Nonnull IssueIndexingParams issueIndexingParams)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: IssueIndexer
      Delete selected indexes.
      Specified by:
      deleteIndexes in interface IssueIndexer
      Parameters:
      issueIndexingParams - parameters describing which indexes should be deleted.
    • openEntitySearcher

      public UnmanagedIndexSearcher openEntitySearcher(IndexDirectoryFactory.Name index)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: UnmanagedIndexSearcherProvider
      Issue searcher has to be closed after doing stuff. Note: when doing this you need to have the index read lock, as this may trigger creating index when not there; See IndexManagerBase.indexLock. See IndexManagerBase.getEntitySearcher(IndexDirectoryFactory.Name) ()}.
      Specified by:
      openEntitySearcher in interface UnmanagedIndexSearcherProvider
    • optimize

      public Index.Result optimize()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      optimize in interface IssueIndexer
    • shutdown

      public void shutdown()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      shutdown in interface IssueIndexer
    • getIndexPaths

      public List<String> getIndexPaths()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getIndexPaths in interface IssueIndexer
    • getIndexRootPath

      public String getIndexRootPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getIndexRootPath in interface IssueIndexer
    • contributeToBackup

      public void contributeToBackup(BackupBuilder backupBuilder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: BackupContributor
      Contribute a set of files to the given backupBuilder to include them in the backup being created when this method was called.
      Specified by:
      contributeToBackup in interface BackupContributor
      Parameters:
      backupBuilder - builder of the backup being created at the time of call. All existing and nonempty files passed to its accept method will be included. The builder may not be reusable and the reference should not be stored outside the scope of this method