Skip to main content
Search dictionaries define filtering, ranking, grouping, pagination, and field selection for Chroma queries. Each SDK provides a DSL, but they compile to the same JSON format that you can construct directly. For example, SDK code like this:
Gets compiled to this JSON:
This reference describes the Search dictionary format and rules. For related dictionary references, see Where Filters.

JSON Format

Basic Structure

A Search dictionary is an object with optional keys:
All keys are optional. Omitted keys use Search defaults.

Component Schemas

where

where uses the Where Filter dictionary schema.
See Where Filters for full operator and rule definitions.

rank

rank must be a dictionary with exactly one top-level operator.

group_by

group_by can be omitted or provided as a dictionary with both keys and aggregate.

limit

Controls pagination.

select

Controls returned fields. Use built-ins (#id, #document, #embedding, #metadata, #score) and/or metadata field names.