public class

ReindexResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.index.ReindexResource

Class Overview

REST resource for starting/stopping/querying indexing.

Summary

Public Constructors
ReindexResource(IndexLifecycleManager indexLifecycleManager, TaskManager taskManager, JiraAuthenticationContext jiraAuthenticationContext, PermissionManager permissionManager, JiraBaseUrls jiraBaseUrls, I18nHelper.BeanFactory i18nBeanFactory)
Public Methods
Response getReindexInfo(long taskId)
Returns information on the system reindexes.
Response reindex(String type, boolean indexComments, boolean indexChangeHistory)
Kicks off a reindex.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ReindexResource (IndexLifecycleManager indexLifecycleManager, TaskManager taskManager, JiraAuthenticationContext jiraAuthenticationContext, PermissionManager permissionManager, JiraBaseUrls jiraBaseUrls, I18nHelper.BeanFactory i18nBeanFactory)

Public Methods

public Response getReindexInfo (long taskId)

Returns information on the system reindexes. If a reindex is currently taking place then information about this reindex is returned. If there is no active index task, then returns information about the latest reindex task run, otherwise returns a 404 indicating that no reindex has taken place.

Parameters
taskId the id of an indexing task you wish to obtain details on. If omitted, then defaults to the standard behaviour and returns information on the active reindex task, or the last task to run if no reindex is taking place. . If there is no reindexing task with that id then a 404 is returned.

public Response reindex (String type, boolean indexComments, boolean indexChangeHistory)

Kicks off a reindex. Need Admin permissions to perform this reindex.

Parameters
type Case insensitive String indicating type of reindex. If omitted, then defaults to BACKGROUND_PREFERRED
indexComments Indicates that comments should also be reindexed. Not relevant for foreground reindex, where comments are always reindexed.
indexChangeHistory Indicates that changeHistory should also be reindexed. Not relevant for foreground reindex, where changeHistory is always reindexed.
Returns
  • Response that provides a redirect to the GET.