Skip to content

Function: reindex() ​

ts
function reindex(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  currentProgress?: number;
  currentSubTask?: string;
  finishTime?: Date;
  progressUrl?: string;
  startTime?: Date;
  submittedTime?: Date;
  success?: boolean;
  type?:   | string & object
     | "FOREGROUND"
     | "BACKGROUND"
     | "BACKGROUND_PREFFERED"
     | "BACKGROUND_PREFERRED";
}>;

Defined in: src/server/api/indexing.ts:116

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

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ indexChangeHistory?: boolean; indexComments?: boolean; indexWorklogs?: boolean; type?: string; }-
parameters.indexChangeHistory?booleanIndicates that changeHistory should also be reindexed. Not relevant for foreground reindex, where changeHistory is always reindexed.
parameters.indexComments?booleanIndicates that comments should also be reindexed. Not relevant for foreground reindex, where comments are always reindexed.
parameters.indexWorklogs?booleanIndicates that worklogs should also be reindexed. Not relevant for foreground reindex, where worklogs are always reindexed.
parameters.type?stringCase insensitive String indicating type of reindex. If omitted, then defaults to BACKGROUND_PREFERRED. Not relevant for Search Platform that only supports BACKGROUND reindexing e.g. OpenSearch.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; currentProgress?: number; currentSubTask?: string; finishTime?: Date; progressUrl?: string; startTime?: Date; submittedTime?: Date; success?: boolean; type?: | string & object | "FOREGROUND" | "BACKGROUND" | "BACKGROUND_PREFFERED" | "BACKGROUND_PREFERRED"; }>