Stage Category: ENRICH (Enriches documents with classifications)Transformation: N documents → N documents (with taxonomy labels added)
When to Use
When NOT to Use
Parameters
Each document stays one document:
top_k limits how many assignments are considered for it and does not duplicate the document.
Configuration Examples
Output Schema
The stage writes assignments as flat fields on the document. Field names start with a prefix taken from the taxonomy ID: a leadingtax_ is removed, the rest is lowercased, and runs of characters other than letters and digits become _. The taxonomy tax_product_categories gives the prefix product_categories.
When several assignments are kept, these fields describe the highest-scoring one. Values selected by
fields are merged for every kept assignment, from the highest score to the lowest.
Basic Classification
Hierarchical Taxonomy
For a hierarchical taxonomy the path and level fields are added as well.Merged Enrichment Fields
Fields listed infields are copied from the matched node onto the document, under target_field when one is set. With fields set to [{"field_path": "label", "target_field": "visual_style"}], the node’s label lands in visual_style.
No Match
When no assignment reachesmin_score, the document continues without any taxonomy fields added.
Taxonomy Structure
Taxonomies are hierarchical classification systems:- ID: Identifier of the matched node, usually a collection ID (
_taxonomy_{prefix}_id) - Label: Human-readable name (
_taxonomy_{prefix}_label) - Level: Depth in the hierarchy, where 0 is the root (
{prefix}_hierarchy_level)
Performance
Common Pipeline Patterns
Search + Classify + Filter
Multi-Taxonomy Classification
Faceted Search Results
Error Handling
Related
- LLM Enrich - Free-form extraction
- Document Enrich - Collection joins
- Attribute Filter - Filter by categories

