v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBCollection Taxonomies
Apply Taxonomy to Existing Documents
Apply a taxonomy to all existing documents in a collection retroactively.
This endpoint triggers distributed Ray processing to enrich existing documents with taxonomy data. Unlike automatic materialization (which happens during ingestion), this endpoint allows you to:
- Backfill enrichment for documents ingested before the taxonomy was created
- Re-apply taxonomy after configuration changes
- Process specific subsets using scroll_filters
⚙️ Processing Details:
- Uses Ray datasets with map_batches for parallel processing
- Scales horizontally across Ray cluster
- Non-blocking: Returns immediately with task_id
- Monitor progress via Tasks API
⚠️ Prerequisites:
- Taxonomy must exist and be valid
- Taxonomy must be in collection's taxonomy_applications list
- Collection must contain documents
📊 Performance:
- ~1000-5000 docs/second depending on cluster size
- Parallel processing across multiple Ray workers
- Batch size and parallelism configurable
🔍 Use Cases:
- Backfill: Apply new taxonomy to historical data
- Re-enrichment: Update after taxonomy changes
- Selective: Process filtered document subsets
See Collections API and Taxonomies API documentation for details.
post/v1/collections/{collection_identifier}/apply-taxonomy
Path parameters
collection_identifierstring required
Collection ID or name to apply taxonomy to
Collection ID or name to apply taxonomy to
Request body
Example request
{
"description": "Apply taxonomy to all documents",
"taxonomy_id": "tax_abc123"
}Response
Successful Response
Example response
{
"collection_id": "col_products",
"estimated_documents": 15000,
"status": "submitted",
"task_id": "ray_task_abc123",
"taxonomy_id": "tax_categories"
}