NEWVectors or files. Pick a path.Start →

    Result Grouping

    Group search results by field values for faceted display and category organization

    Why do anything?

    Flat result lists are hard to navigate. Grouping organizes results into meaningful categories.

    Why now?

    Faceted interfaces require grouped results for navigation.

    Why this feature?

    Group documents by any payload field, with configurable group limits and representative selection.

    How It Works

    Group by partitions results into categories based on field values.

    1

    Value Extraction

    Extract group field values

    2

    Partitioning

    Partition documents into groups

    3

    Selection

    Select top items per group

    Why This Approach

    In-pipeline grouping enables faceted UIs without multiple queries.

    Integration

    retriever = client.retrievers.create(stages=[{"type": "group_by", "field": "category"}])