com.atlassian.jira.rest.v2.index
Class ReindexResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.index.ReindexResource

public class ReindexResource
extends Object

REST resource for starting/stopping/querying indexing.

Since:
v6.1.4

Constructor Summary
ReindexResource(IndexLifecycleManager indexLifecycleManager, TaskManager taskManager, JiraAuthenticationContext jiraAuthenticationContext, PermissionManager permissionManager, JiraBaseUrls jiraBaseUrls, I18nHelper.BeanFactory i18nBeanFactory)
           
 
Method Summary
 javax.ws.rs.core.Response getReindexInfo(long taskId)
          Returns information on the system reindexes.
 javax.ws.rs.core.Response reindex(String type, boolean indexComments, boolean indexChangeHistory)
          Kicks off a reindex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReindexResource

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

reindex

public javax.ws.rs.core.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.

getReindexInfo

public javax.ws.rs.core.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.
Since:
v6.1.4


Copyright © 2002-2014 Atlassian. All Rights Reserved.