> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a new understanding to existing content

> Run a second extractor over objects you already ingested, price it first, and pay only for the new work.

Run a second extractor over objects you already ingested, price it first, and pay only for the new work. One bucket of articles feeds two collections side by side: the original one embedding per article, and a new one that chunks each article and labels every chunk.

> [card] [Jump to the manifest](#the-manifest)
>
> `reprocess-existing-content.namespace.yaml`: apply it with one API call, then read the walkthrough below to change it.

## At a glance

| | |
| - | - |
| **Creates** | 1 namespace, 1 bucket, 2 collections, 2 retrievers |
| **Extractors** | [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text) v1 |
| **Daily spend budget** | 1 USD, set on the namespace. Queries are not capped. |
| **Sample data** | 6 objects, uploaded to `articles` when you apply |

## How the pieces connect

Buckets hold what you upload, collections turn it into searchable documents, and retrievers answer queries over the collections.

```mermaid theme={null}
flowchart LR
  b0[("articles")]
  c1["articles-v1<br/>text_extractor v1"]
  c2["articles-v2<br/>text_extractor v1"]
  r3{{"search-v1"}}
  r4{{"search-v2"}}
  b0 --> c1
  b0 --> c2
  c1 --> r3
  c2 --> r4
```

## Deploy it

**1. Get the manifest**

```bash theme={null}
# Copy the manifest from the bottom of this page into reprocess-existing-content.namespace.yaml
```

**2. Validate it**

Validate runs every check apply runs and creates nothing. Fix each entry in `errors`, then run it again.

```bash theme={null}
curl -X POST https://api.mixpeek.com/v1/manifest/validate \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -F "manifest_file=@reprocess-existing-content.namespace.yaml"
```

**3. Apply it**

Apply creates every resource in one call. `wait_for_seed=true` also waits until the sample objects are processed, so the first query below has documents to return.

```bash theme={null}
curl -X POST "https://api.mixpeek.com/v1/manifest/apply?wait_for_seed=true" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -F "manifest_file=@reprocess-existing-content.namespace.yaml"
```

The response lists each resource with its outcome in `resources`. Apply refuses a resource that already exists and rolls the whole apply back, so to apply the file again over this namespace add `?mode=create_missing`, which creates only what is missing.

## Run the first query

Look up the namespace id by name, then run `search-v2`. Check `status` and `warnings` along with `documents`: a run that times out still answers 200, with `status` `degraded`.

```bash cURL theme={null}
NAMESPACE_ID=$(curl -s https://api.mixpeek.com/v1/namespaces/reprocess-existing-content \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" | jq -r .namespace_id)

curl -X POST https://api.mixpeek.com/v1/retrievers/search-v2/execute \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"query": "my upload failed because the file is too big"}}' \
  | jq '{status, warnings, documents: [.documents[] | {document_id, score}]}'
```

```python Python theme={null}
import os, requests

AUTH = {"Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}"}
ns = requests.get("https://api.mixpeek.com/v1/namespaces/reprocess-existing-content", headers=AUTH).json()

run = requests.post(
    "https://api.mixpeek.com/v1/retrievers/search-v2/execute",
    headers={**AUTH, "X-Namespace": ns["namespace_id"]},
    json={"inputs": {"query": "my upload failed because the file is too big"}},
).json()

print(run["status"], run["warnings"])  # "completed" on a clean run
for doc in run["documents"]:
    print(doc["document_id"], doc["score"])
```

```javascript JavaScript theme={null}
const auth = { Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}` };
const ns = await fetch("https://api.mixpeek.com/v1/namespaces/reprocess-existing-content", { headers: auth }).then((r) => r.json());

const run = await fetch("https://api.mixpeek.com/v1/retrievers/search-v2/execute", {
  method: "POST",
  headers: { ...auth, "X-Namespace": ns.namespace_id, "Content-Type": "application/json" },
  body: JSON.stringify({"inputs": {"query": "my upload failed because the file is too big"}}),
}).then((r) => r.json());

console.log(run.status, run.warnings); // "completed" on a clean run
for (const doc of run.documents) console.log(doc.document_id, doc.score);
```

## Add your own data

Each object you add to a bucket is processed by every collection that reads it. This adds one object to `articles`. `NAMESPACE_ID` is the id from the namespace lookup above.

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/buckets/articles/objects?auto_process=true" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"title": "example", "category": "example", "blobs": [{"property": "content", "type": "text", "data": "The text you want indexed."}]}'
```

```python Python theme={null}
import os, requests

HEADERS = {"Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}", "X-Namespace": os.environ["NAMESPACE_ID"]}

obj = requests.post(
    "https://api.mixpeek.com/v1/buckets/articles/objects",
    params={"auto_process": "true"},
    headers=HEADERS,
    json={
        "title": "example",
        "category": "example",
        "blobs": [
            {
                "property": "content",
                "type": "text",
                "data": "The text you want indexed."
            }
        ]
    },
).json()
print(obj["object_id"], obj["status"])  # PENDING until processing finishes
```

```javascript JavaScript theme={null}
const headers = {
  Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}`,
  "X-Namespace": process.env.NAMESPACE_ID,
  "Content-Type": "application/json",
};

const obj = await fetch("https://api.mixpeek.com/v1/buckets/articles/objects?auto_process=true", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "title": "example",
    "category": "example",
    "blobs": [
      {
        "property": "content",
        "type": "text",
        "data": "The text you want indexed."
      }
    ]
  }),
}).then((r) => r.json());
console.log(obj.object_id, obj.status); // PENDING until processing finishes
```

The object is `PENDING` until processing finishes, then `COMPLETED` or `FAILED`. [Buckets and objects](https://docs.mixpeek.com/docs/ingest/buckets.md) covers object states, retries and duplicates.

## Retrievers

### `search-v1`

Search the original understanding: whole articles, closest in meaning first.

**Stages:** [`feature_search`](https://docs.mixpeek.com/docs/retrieve/stages#feature-search)

**Searches:** `articles-v1`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | The question or description to search for; embedded and compared against every article |

### `search-v2`

Search the new understanding: 3-sentence chunks, closest in meaning first, each with its intent and key terms.

**Stages:** [`feature_search`](https://docs.mixpeek.com/docs/retrieve/stages#feature-search)

**Searches:** `articles-v2`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | The question or description to search for; embedded and compared against every chunk |

## Collections

Each collection runs one extractor over a bucket, or over another collection's documents.

> [accordion] articles-v1
>
> text\_extractor\@v1 over bucket articles, the original understanding: one document and one embedding per article. Feeds search-v1.
>
> **Reads** bucket `articles` with [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text) v1.
>
> **Inputs:** `text` ← `content`
>
> **Copied onto each document:** `title`, `category`

> [accordion] articles-v2
>
> text\_extractor\@v1 over the same bucket, the new understanding: each article split into chunks of 3 sentences, each chunk embedded and labeled with an intent and its key terms. Feeds search-v2.
>
> **Reads** bucket `articles` with [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text) v1.
>
> **Inputs:** `text` ← `content`
>
> **Copied onto each document:** `title`, `category`

## The manifest

Every resource above comes from this file. Change it and apply it again with `?mode=upsert` to update what exists. [Manifests](https://docs.mixpeek.com/docs/manage/manifests.md) documents each field.

```yaml reprocess-existing-content.namespace.yaml expandable theme={null}
# reprocess-existing-content: one bucket of help articles read by two collections, so the
# same objects carry two understandings side by side.
# Platform manifest schema (GET /v1/discovery/schema). Validate with POST /v1/manifest/validate,
# apply with POST /v1/manifest/apply. Wiring: the articles bucket feeds both collections;
# search-v1 reads articles-v1 and search-v2 reads articles-v2.
#   articles-v1  the original understanding: one embedding per article.
#   articles-v2  the new one: 3-sentence chunks, each embedded and labeled with its intent
#                and its key terms by an LLM.
# Applying a SECOND time, over a namespace this template already created: use
# POST /v1/manifest/apply?mode=create_missing, which creates what is missing and leaves
# what exists alone. The default, create_only, fails the WHOLE apply and rolls it back if
# any resource already exists. Use mode=upsert to also patch resources that exist but have
# drifted from this file.
version: '1.0'
metadata:
  name: reprocess-existing-content
  description: "Guide template reprocess-existing-content: one bucket of articles, an original text_extractor collection and a second one that chunks and labels the same objects, with a retriever over each."
namespaces:
  - name: reprocess-existing-content
    description: "Everything below lives in this namespace."
    feature_extractors:
      - name: text_extractor
        version: v1
    # A keyword index makes exact-match filters on intent fast, and is required to
    # filter on it inside a vector search.
    payload_indexes:
      - field_name: intent
        type: keyword
    # Daily spend budget, in dollars of what you are charged (1,000 credits a dollar).
    # New batches pause once the namespace has spent this much today; queries are not capped.
    # Raise it later on the namespace: PATCH /v1/namespaces/<id> {"spend_budget": {"daily_usd": N}}.
    budget:
      daily_usd: 1

buckets:
  - name: articles
    namespace: reprocess-existing-content
    description: "One object per help article: its body in content, plus a title and a category. Both collections read every object here."
    schema:
      properties:
        content:
          type: text
          required: true
        title:
          type: string
        category:
          type: string

collections:
  - name: articles-v1
    namespace: reprocess-existing-content
    description: "text_extractor@v1 over bucket articles, the original understanding: one document and one embedding per article. Feeds search-v1."
    source:
      type: bucket
      bucket: articles
    feature_extractor:
      name: text_extractor
      version: v1
      input_mappings:
        text: content
      field_passthrough:
        - source_path: title
        - source_path: category
    enabled: true
  - name: articles-v2
    namespace: reprocess-existing-content
    description: "text_extractor@v1 over the same bucket, the new understanding: each article split into chunks of 3 sentences, each chunk embedded and labeled with an intent and its key terms. Feeds search-v2."
    source:
      type: bucket
      bucket: articles
    feature_extractor:
      name: text_extractor
      version: v1
      input_mappings:
        text: content
      parameters:
        split_by: sentences
        chunk_size: 3
        chunk_overlap: 1
        response_shape:
          type: object
          properties:
            intent:
              type: string
              enum: [how_to, troubleshooting, policy, reference]
              description: "What a reader of this passage is trying to do: how_to for steps, troubleshooting for an error or a fault, policy for rules and limits, reference for facts to look up."
            key_terms:
              type: array
              items:
                type: string
              description: "Product terms, settings and error names the passage mentions, written as they appear. 1-6 items."
      field_passthrough:
        - source_path: title
        - source_path: category
    enabled: true

retrievers:
  - name: search-v1
    namespace: reprocess-existing-content
    description: "Search the original understanding: whole articles, closest in meaning first."
    collections:
      - articles-v1
    input_schema:
      query:
        type: text
        required: true
        description: "The question or description to search for; embedded and compared against every article"
    stages:
      - stage_name: search
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://text_extractor@v1"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 20
          final_top_k: 5
    tags:
      - template:reprocess-existing-content
  - name: search-v2
    namespace: reprocess-existing-content
    description: "Search the new understanding: 3-sentence chunks, closest in meaning first, each with its intent and key terms."
    collections:
      - articles-v2
    input_schema:
      query:
        type: text
        required: true
        description: "The question or description to search for; embedded and compared against every chunk"
    stages:
      - stage_name: search
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://text_extractor@v1"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 20
          final_top_k: 5
    tags:
      - template:reprocess-existing-content

# Six short help articles, written inline. Applying processes each one through both
# collections, so the two understandings start with the same corpus.
seed:
  - bucket: articles
    max_objects: 6
    objects:
      - texts:
          content: "To reset your password, open the sign-in page and select Forgot password. Enter the email address on your account and we send a reset link that works for 30 minutes. Open the link, choose a new password of at least 12 characters, and sign in again. Every other session on the account is signed out when the password changes."
        title: "Reset your password"
        category: account
      - texts:
          content: "If the app shows error E-401 Session expired, your sign-in token is older than 14 days. Sign out, close the app completely, and sign in again to get a new token. If the error comes back within a day, check that your device clock is set automatically, because a clock more than 5 minutes off makes every new token look expired. Signing in on a second device does not end the session on the first."
        title: "Fix error E-401 Session expired"
        category: troubleshooting
      - texts:
          content: "Refunds are available within 30 days of purchase for annual plans and within 7 days for monthly plans. A refund goes back to the original payment method and takes 5 to 10 business days to appear. Usage-based charges for storage and processing are not refundable once the work has run. Accounts closed for abuse are not eligible for a refund."
        title: "Refund policy"
        category: billing
      - texts:
          content: "To export your data, open Settings, then Data, and select Export. Choose CSV for spreadsheets or JSON to keep nested fields. Exports up to 1 GB download right away. Larger exports are prepared in the background and we email a download link that stays valid for 7 days."
        title: "Export your data"
        category: account
      - texts:
          content: "Uploads fail with error E-413 Payload too large when a single file is over 5 GB. Split the file, or upload it with the resumable upload endpoint, which accepts files up to 5 TB in parts of 8 MB to 5 GB. A slow connection that drops mid-upload resumes from the last part that finished. Images and video over 5 GB must also use the resumable endpoint."
        title: "Fix error E-413 Payload too large"
        category: troubleshooting
      - texts:
          content: "Each workspace includes 10 seats on the Team plan and 100 seats on the Business plan. An admin invites a teammate from Members by entering their email address. An invitation expires after 72 hours. Removing a member frees the seat at once, and their files move to the admin who removed them."
        title: "Seats and invitations"
        category: billing
```

## Hand it to an agent

Paste this prompt into Claude Code, Cursor or another coding agent. To give the agent this whole page instead, use **Copy page** in the menu at the top of the page, or point it at the page's Markdown at `https://mixpeek.com/docs/templates/reprocess-existing-content.md`.

```text Prompt theme={null}
Set up the Mixpeek "Add a new understanding to existing content" template in my organization. My API key is in MIXPEEK_API_KEY.
1. Save the manifest at the bottom of https://mixpeek.com/docs/templates/reprocess-existing-content as reprocess-existing-content.namespace.yaml.
2. POST it to https://api.mixpeek.com/v1/manifest/validate as the multipart field manifest_file, with the header Authorization: Bearer $MIXPEEK_API_KEY. Fix every entry in errors and validate again.
3. POST the same file to https://api.mixpeek.com/v1/manifest/apply?wait_for_seed=true. Every entry in resources should be created.
4. GET https://api.mixpeek.com/v1/namespaces/reprocess-existing-content and keep namespace_id. Send it as the X-Namespace header on every call below.
5. POST {"inputs": {"query": "my upload failed because the file is too big"}} to https://api.mixpeek.com/v1/retrievers/search-v2/execute. Read documents, check that status is completed, and print warnings.
Reference for this template: https://mixpeek.com/docs/templates/reprocess-existing-content.md
```

## How it works

Any number of collections can read one bucket. So a new understanding of content you already have is a new collection over the same bucket: nothing is uploaded again, and the collection serving your queries today stays as it is. This manifest builds both:

| Collection | Parameters | Documents per article | Fields on each document |
| - | - | - | - |
| `articles-v1` | `text_extractor` defaults: `split_by` is `none` | 1 | `text`, its embedding, `title`, `category` |
| `articles-v2` | `split_by: sentences`, `chunk_size: 3`, `chunk_overlap: 1`, and a `response_shape` | One per 3-sentence chunk | The same, plus `intent` and `key_terms` |

`response_shape` turns on structured extraction: `text_extractor` splits the article, asks an LLM (Gemini 2.5 Flash unless `llm_provider` or `llm_model` is set) to fill the schema for each chunk, then embeds the chunk. Each schema property becomes a field of the same name on the chunk's document.

`search-v1` and `search-v2` run the same `feature_search` stage over different collections, so the comparison isolates what the collections did differently.

The rest of this page covers the usual case: the bucket and the original collection already hold content, and you add the second one.

## Add only the new collection

A collection resolves its namespace and bucket only from resources declared in the same file. A file with the collection alone is refused with "references bucket 'articles': not declared in the manifest".

So make `add-articles-v2.namespace.yaml` from the manifest above: keep `version`, `namespaces`, the `articles` bucket, the `articles-v2` collection and the `search-v2` retriever, and drop the rest. For your own namespace, use your names and copy the bucket's schema from `bucket_schema` in `GET /v1/buckets/{bucket}`. Apply it with `?mode=create_missing`, which skips the namespace and bucket that exist and creates the collection and the retriever.

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/manifest/apply?mode=create_missing" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -F "manifest_file=@add-articles-v2.namespace.yaml" \
  | jq '.resources[] | {resource_type, name, status}'
```

The new collection starts empty. Objects already in the bucket reach it only through a batch; objects added from now on go through both collections.

## Scope a batch to the new collection

A batch names objects from one bucket and the collections to run them through. `collection_ids` limits it to the new collection, plus any collection that reads from it. This creates a `DRAFT` batch, which does nothing until you submit it, over every object in `articles`. The list call returns up to 100 objects a page; follow `pagination.next_cursor` for more, or pass `filters` on the batch instead of `object_ids` to select up to 50,000 objects server-side.

```bash cURL theme={null}
NEW_COLLECTION_ID=$(curl -s https://api.mixpeek.com/v1/collections/articles-v2 \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" | jq -r .collection_id)

OBJECT_IDS=$(curl -s -X POST "https://api.mixpeek.com/v1/buckets/articles/objects/list?limit=100" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" -d '{}' | jq -c '[.results[].object_id]')

BATCH_ID=$(curl -s -X POST https://api.mixpeek.com/v1/buckets/articles/batches \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"object_ids": '"$OBJECT_IDS"', "collection_ids": ["'"$NEW_COLLECTION_ID"'"], "batch_name": "articles-v2 backfill"}' \
  | jq -r .batch_id)
echo "$BATCH_ID"
```

## Price it before you submit

`estimate-cost` prices a `DRAFT` batch the way submit charges it, and charges nothing.

```bash cURL theme={null}
curl -s -X POST "https://api.mixpeek.com/v1/buckets/articles/batches/$BATCH_ID/estimate-cost" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" \
  | jq '{object_count, already_extracted_count, estimated_usd, batch_minimum_usd, batch_minimum_applied, features, warnings}'
```

| Field | Read it as |
| - | - |
| `object_count` | Objects the batch processes |
| `already_extracted_count` | Objects that already have documents in the batch's collections. `0` for a new collection |
| `estimated_usd` | What submit charges, in dollars |
| `batch_minimum_usd`, `batch_minimum_applied` | The minimum charge per batch, and whether this estimate is that minimum |

Without `collection_ids` the batch includes `articles-v1` too, but the default `dedup_strategy`, `skip`, does not rerun an object through a collection that already has its documents, so it still pays only for `articles-v2`. `replace` and `force` rerun and charge again. Scope with `collection_ids` anyway, so the batch records exactly the work you meant.

## Submit, then check only the new work ran

Count the original collection's documents, submit, and wait for the batch to finish:

```bash cURL theme={null}
H=(-H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID")
V1_BEFORE=$(curl -s "${H[@]}" https://api.mixpeek.com/v1/collections/articles-v1/documents/count | jq .count)

curl -s -X POST "${H[@]}" -H "Content-Type: application/json" -d '{}' \
  "https://api.mixpeek.com/v1/buckets/articles/batches/$BATCH_ID/submit" | jq '{task_id, status}'

while true; do
  BATCH=$(curl -s "${H[@]}" "https://api.mixpeek.com/v1/buckets/articles/batches/$BATCH_ID")
  STATUS=$(echo "$BATCH" | jq -r .status)
  case "$STATUS" in COMPLETED|COMPLETED_WITH_ERRORS|FAILED|CANCELED) break ;; esac
  sleep 10
done

echo "$BATCH" | jq '{status, collection_ids, documents_written, cost_usd: .cost.cost_usd, dedup_audit}'
echo "articles-v1 before: $V1_BEFORE, after: $(curl -s "${H[@]}" https://api.mixpeek.com/v1/collections/articles-v1/documents/count | jq .count)"
echo "articles-v2: $(curl -s "${H[@]}" https://api.mixpeek.com/v1/collections/articles-v2/documents/count | jq .count)"
```

The boundary held when `collection_ids` holds only `articles-v2`, the `articles-v1` count is unchanged, and `cost.cost_usd` is close to `estimated_usd`. `dedup_audit` shows, per collection, how many objects ran and how many were skipped.

## Compare the two understandings

Run the same query through both retrievers:

```bash cURL theme={null}
for R in search-v1 search-v2; do
  echo "== $R"
  curl -s -X POST "https://api.mixpeek.com/v1/retrievers/$R/execute" \
    -H "Authorization: Bearer $MIXPEEK_API_KEY" \
    -H "X-Namespace: $NAMESPACE_ID" \
    -H "Content-Type: application/json" \
    -d '{"inputs": {"query": "my upload failed because the file is too big"}}' \
    | jq '{status, warnings, documents: [.documents[] | {title, intent, key_terms, score, text}]}'
done
```

`search-v1` returns whole articles, so the E-413 article answers with all of its text. `search-v2` returns the chunk that holds the answer, with the `intent` and `key_terms` the LLM gave it, such as `troubleshooting` and the error name. To compare systematically, run an [evaluation](https://docs.mixpeek.com/docs/retrieve/relevance.md) dataset against both.

A filter inside a vector search needs a payload index; the full manifest declares a `keyword` index on `intent`. If you used the smaller file, add the index and apply with `?mode=upsert`:

```yaml add-articles-v2.namespace.yaml: the namespace theme={null}
namespaces:
  - name: reprocess-existing-content
    feature_extractors:
      - name: text_extractor
        version: v1
    payload_indexes:
      - field_name: intent
        type: keyword
```

Then pass the filter with the query:

```json Execute body for search-v2, troubleshooting chunks only theme={null}
{
  "inputs": {"query": "sign-in keeps failing"},
  "filters": {"AND": [{"field": "intent", "operator": "eq", "value": "troubleshooting"}]}
}
```

### Cut over

When the new collection wins, change `collections` on `search-v1`, the retriever your application calls, and apply with `?mode=upsert`. Callers keep the same name and id:

```yaml reprocess-existing-content.namespace.yaml: search-v1 theme={null}
  - name: search-v1
    namespace: reprocess-existing-content
    description: "Search the original understanding: whole articles, closest in meaning first."
    collections:
      - articles-v2
```

The `feature_uri` stays the same, since both collections index it. Keep `articles-v1` until the new one has served for a while; deleting it is the only step here you cannot undo. To swap the embedding model for a whole namespace instead, use [model migration](https://docs.mixpeek.com/docs/extract/collections.md).

## Re-run only the failures

A batch that ends `COMPLETED_WITH_ERRORS` or `FAILED` records each failed document. Read them, then retry only those. The default `retry_mode`, `transient_only`, retries timeouts, network errors and rate limits; `all` retries every failure, for after you fix the data. Retry answers 400 for a batch that ended `COMPLETED`.

```bash cURL theme={null}
curl -s "https://api.mixpeek.com/v1/buckets/articles/batches/$BATCH_ID/failed-documents?limit=100" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" \
  | jq '{total_failures, summary}'

curl -s -X POST "https://api.mixpeek.com/v1/buckets/articles/batches/$BATCH_ID/retry" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"retry_mode": "transient_only"}'
```

Documents that succeeded are left alone. An object that failed before writing any document has no failed-document record, so retry cannot reach it; the response then carries a `remedy` that points to `POST .../batches/{batch_id}/resubmit`, which runs the whole batch again.

## Next steps

> [card] [Text extractor](https://docs.mixpeek.com/docs/extract/extractors.md#text)
>
> Chunking, structured extraction with `response_shape`, and HTML pages.

> [card] [Manifests](https://docs.mixpeek.com/docs/manage/manifests.md)
>
> Apply modes and every field a manifest can declare.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.