# PartitionEmbeddingIndexState

Progress of a partition's re-index: after its embedding profile changes, every file is embedded again with the new model. The file counts are recounted each time the re-index moves forward, so files added or deleted while it runs are counted correctly.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `status` | [`PartitionEmbeddingIndexStatus`](https://docs.maitento.com/reference/types/partition-embedding-index-status.md) | Where the re-index is: `Ready`, `Reindexing` or `Failed`. |
| `startedUtc` | `datetime \| null` | When the current re-index was requested (UTC). |
| `preparedUtc` | `datetime \| null` | When the old index was cleared and every file lined up to be embedded again (UTC). The re-index cannot complete before this is set. |
| `completedUtc` | `datetime \| null` | When the re-index finished successfully (UTC). Null while it is running or after it failed. |
| `lastProgressUtc` | `datetime \| null` | When the counts last moved (UTC). |
| `totalFiles` | `integer \| null` | Files in the partition at the last progress update. Null until the re-index is prepared. |
| `completedFiles` | `integer \| null` | Files already embedded with the new profile at the last progress update. |
| `unindexedFiles` | `integer \| null` | Files that could not be embedded with the new profile when the re-index was completed without them, because each had failed repeatedly. Null when none were left behind. They are retried automatically, so this is a count to show, not a permanent loss. |
| `failureReason` | `string \| null` | A stable code for why the re-index failed, so you can show your own explanation: `credentials-failed` (every key failed, and falling back to Maitento's is not allowed), `no-credentials` (no key for the new provider, and no consent to use Maitento's) or `walk-failed` (preparing the re-index kept failing; send the profile again to retry). Null unless it failed. |
| `previousProfile` | [`PartitionEmbeddingProfile`](https://docs.maitento.com/reference/types/partition-embedding-profile.md)`\| null` | The profile the partition had before this re-index. Null: the default. |

## Example

```json
{
  "status": "Ready",
  "startedUtc": "2026-10-26T12:00:00.0000000Z",
  "preparedUtc": "2026-10-26T12:00:00.0000000Z",
  "completedUtc": "2026-10-26T12:00:00.0000000Z",
  "lastProgressUtc": "2026-10-26T12:00:00.0000000Z",
  "totalFiles": 0,
  "completedFiles": 0,
  "unindexedFiles": 0,
  "failureReason": "...",
  "previousProfile": {
    "provider": "OpenAi",
    "model": "...",
    "dimensions": 0,
    "chunkSizeTokens": 0,
    "chunkOverlapTokens": 0,
    "custom": false
  }
}
```

## Where it's used

- Inside [`Partition`](https://docs.maitento.com/reference/types/partition.md)
- Inside [`PartitionEmbeddingStatus`](https://docs.maitento.com/reference/types/partition-embedding-status.md)
