ADR: new reindex API to reindex the given records
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Context
As of now, indexer has a reindex API to reindex the whole given kind. The API is useful in the scenarios when index data need to be migrated because of some bug fixes, new indexer features etc. Sometimes, it may not necessary to reindex the entire kind if we know the exact impact, so it will be good to have a reindex API that only reindex the given records.
The use cases of the new API could be:
- If there is a indexer bug or new indexer feature deployed, and we know exactly what are the records been impacted, we could use such API to only reindex those records
- When user ingests data, and data successfully created in storage, but failed to be indexed in indexer for any reason. Application could use such API to manually fix the impacted records instead of reindexing the whole kind
API spec
paths:
"/api/indexer/v2/reindex/records":
post:
requestBody:
content:
application/json:
shema:
$ref: '#/components/schemas/ReindexRecordsRequest'
schemas:
ReindexRecordsRequest:
type: object
properties:
recordIds:
type: array
items:
type: string
example: ["recordId1", "recordId2]
Limit
We will limit the given number of records as 1000 initially
Edited by Mingyang Zhu