Attribute Filter
Filter documents by payload field values with boolean logic and comparison operators
Why do anything?
Vector search returns similar content regardless of metadata. You need filtering to scope results by category, date, status, etc.
Why now?
Real applications need faceted search. Users expect to filter by attributes while getting semantic results.
Why this feature?
Powerful payload filtering with AND/OR logic, comparison operators (eq, gt, lt, in, contains), and nested field support.
How It Works
Attribute filter is a retriever stage that filters documents by payload field values.
Condition Parsing
Parse filter conditions and boolean logic
Field Extraction
Extract field values from document payloads
Evaluation
Evaluate conditions against field values
Filtering
Pass/reject documents based on evaluation
Why This Approach
Flexible filtering enables faceted search. Boolean logic supports complex conditions.
Where This Is Used
Integration
retriever = client.retrievers.create(stages=[{"type": "attribute_filter", "conditions": [...]}])Recent updates
Full changelog- Jul 26, 2026Filters on your own fields no longer time out and return nothingA filter on a bare user field is pushed to the shard as an OR across three storage forms, so that documents written before and after the metadata-root migration both match. Only one form was being indexed, so the other two legs full-scanned. On a large collection a filter matching a common value spent about 4 seconds per unindexed leg, crossed the 5 second stage ceiling, and the stage was cancelled: the query came back degraded with zero results even though the data was there and one leg had already matched 141,458 documents in 2 seconds. All three storage forms are now indexed at provisioning time, through the single builder every create, clone, quickstart and manifest path already funnels through.
- Jul 24, 2026Filters on nested metadata fields no longer return empty resultsAn `eq`, `in`, or `contains` filter that targeted a metadata attribute, a field stored under a document's metadata rather than at the top level, could push down incorrectly and match nothing, so a retriever came back empty even when documents clearly satisfied the filter. Pushdown now recognizes the different metadata path forms, so equality, membership, and contains filters on metadata-resident attributes match the documents they should.