Start a reindex job
Starts a reindex job that populates a new generation by copying documents from an existing generation of the same index inside the engine. The request returns immediately with the job record; the job runs in the background on the node holding the index.
The target must specify a generation by name, must already exist, must be empty, and must not be the live generation. The source generation must have a primary key and keep document sources, and the primary keys of source and target must share a field name and type. If the target does not meet these requirements, the server returns 400.
The job automatically promotes the target generation once it catches up with changes, unless the request specifies "promote": "manual". With manual promotion, the job pauses in the ready phase and keeps the target caught up until actions/promote on the target finishes the job.
Because promoting changes what the index answers for, a request that leaves promotion automatic also needs indexes.promote on the target and is refused with 403 without it. A request specifying "promote": "manual" needs only indexes.reindex.
An index can run at most one reindex job at a time. A finished job's record remains readable until a new job replaces it. Read the record with GET /v1alpha1/admin/reindexes/{name}, which the Location header of the response names.
Path parameters
namestringrequiredindex@generation. It must already exist, be empty, and not be the live generation.Body
Configuration for a reindex job. Both fields are optional; an empty body reads from the live generation and promotes automatically.
fromstringproducts@1. Must belong to the same index as the target. Defaults to the live generation."products@1"promotestringauto (default) automatically promotes the target generation once it catches up with changes. manual pauses the job in the ready phase and keeps the target caught up until you manually promote it.- Default
- "auto"
- Values
- "auto", "manual"
Responses
Location header names the status endpoint of the job.ReindexInfo
A reindex job record. See Job record and phases.
idstringnull on a record an earlier version wrote."6f1c2a9d8b3e4c05"indexstring"products"targetstringindex@generation."products@2"sourcestring"products@1"phasestringpending: accepted and waiting for a concurrency slot on the node. copying: streaming documents from the source to the target in primary key order. replaying: copying documents that changed in the source while the copy ran. ready: used only with promote: manual, caught up and waiting for manual promotion, while continuing to catch up periodically. promoting: holding writes for the final drain and promotion. done: completed and promoted successfully. failed: stopped before promotion due to an error, indicated by error. cancelled: stopped before completion in response to a cancellation request.- Values
- "pending", "copying", "replaying", "ready", "promoting", "done", "failed", "cancelled"
"copying"promotestringauto automatically promotes the target generation once it catches up with changes. manual pauses the job in the ready phase and keeps the target caught up until you manually promote it.- Values
- "auto", "manual"
"auto"documentsCopiedinteger- Format
- int64
125000sourceDocumentsinteger- Format
- int64
2400000backloginteger- Format
- int64
4100errorstringnull.startedBystringroot. null on a record an earlier version wrote."3f9a1c7e2b8d4650"nodestringnull on a record an earlier version wrote."node-a-7f21"startedAtstring"2026-08-28T10:15:30Z"updatedAtstring"2026-08-28T10:16:02Z"finishedAtstringdone, failed or cancelled, or null while it runs."2026-08-28T10:41:17Z"freshnessstringdone, and null before that. Pass it as freshness.atLeast on a search, and the search is answered from the target generation whichever node it lands on. Opaque; pass it back unchanged. See Freshness."AQoIcHJvZHVjdHMSATI"ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- reindex:target_generation_required
- The target names an index without a generation. Name one as `index@generation`.
- reindex:target_is_live
- The target is the live generation. Fill another generation and promote it.
- reindex:target_not_empty
- The target generation already holds documents.
- reindex:source_is_target
- The source and the target are the same generation.
- reindex:source_other_index
- The source belongs to another index.
- reindex:primary_key_mismatch
- The source and the target declare different primary keys.
- reindex:promote_invalid
- `promote` is neither `auto` nor `manual`.
- index:name_invalid
- The path or `from` holds a name that is not a valid index or generation name.
- index:no_primary_key
- The source or the target declares no primary key, so documents cannot be matched up between them.
- document:source_not_kept
- The source generation keeps no copy of the documents to read them back from. A reindex reads the stored copies.
WWW-Authenticate: Bearer.ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- auth:unauthenticated
- The request carries no credential this node accepts.
indexes.reindex permission.ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- auth:forbidden
- The key is accepted but does not hold the `indexes.reindex` permission.
ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- index:not_found
- No index or generation has this name, or the key holds no grant covering it.
ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- index:no_live_generation
- The index has no live generation to read from. Promote one, or name the source with `from`.
- reindex:in_progress
- A reindex job is already running for the index. Wait for it, or cancel it.
- reindex:target_busy
- Another job holds the target generation.
- storage:io_error
- The record of the reindex could not be written. Send the request again once the storage responds.
- indexer:unavailable
- No node is available to write the index. Send the request again once one is.
ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- indexer:unreachable
- The request was forwarded to the index writer and the writer did not answer. Send it again.
Authorization
- Permission
- indexes.reindex
- Checked on
- The index the path names
- Roles
admin
An API key sent as a bearer token, such as Authorization: Bearer exok_4ff6b760264c1918_ePQcdT1O9HSATZoXfDbT8hhHGsP9VpZH. A key carries grants that pair permissions with index patterns; the permission each endpoint needs is named beside it. Nodes running with EXOFIND_AUTH_MODE=none accept requests without a credential, and a node with EXOFIND_AUTH_ANONYMOUS_KEY set serves requests that carry none with the permissions of that key.
Exofind is built by Level Four AB and is available under the Apache License 2.0.