Skip to main content
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.

Jump to the manifest

reprocess-existing-content.namespace.yaml: apply it with one API call, then read the walkthrough below to change it.

At a glance

How the pieces connect

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

Deploy it

1

Get the manifest

2

Validate it

Validate runs every check apply runs and creates nothing. Fix each entry in errors, then run it again.
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.
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.

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.
The object is PENDING until processing finishes, then COMPLETED or FAILED. Buckets and objects covers object states, retries and duplicates.

Retrievers

search-v1

Search the original understanding: whole articles, closest in meaning first. Stages: feature_search Searches: articles-v1

search-v2

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

Collections

Each collection runs one extractor over a bucket, or over another collection’s documents.
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 v1.Inputs: text ← contentCopied onto each document: title, category
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 v1.Inputs: text ← contentCopied 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 documents each field.
reprocess-existing-content.namespace.yaml

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.
Prompt

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: 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.
cURL
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.
cURL

Price it before you submit

estimate-cost prices a DRAFT batch the way submit charges it, and charges nothing.
cURL
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:
cURL
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:
cURL
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 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:
add-articles-v2.namespace.yaml: the namespace
Then pass the filter with the query:
Execute body for search-v2, troubleshooting chunks only

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:
reprocess-existing-content.namespace.yaml: search-v1
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.

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.
cURL
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

Text extractor

Chunking, structured extraction with response_shape, and HTML pages.

Manifests

Apply modes and every field a manifest can declare.