Mixpeek Logo

    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.

    1

    Condition Parsing

    Parse filter conditions and boolean logic

    2

    Field Extraction

    Extract field values from document payloads

    3

    Evaluation

    Evaluate conditions against field values

    4

    Filtering

    Pass/reject documents based on evaluation

    Why This Approach

    Flexible filtering enables faceted search. Boolean logic supports complex conditions.

    Integration

    retriever = client.retrievers.create(stages=[{"type": "attribute_filter", "conditions": [...]}])