Open
Description
Describe the problem
This issue tracks the feature request to add support for storing and querying lists as values within Chroma's metadata fields. Currently, metadata fields are limited to single values (strings, integers, floats, booleans). This limitation hinders use cases that require associating multiple values with a single metadata key, such as tags, categories, or other multi-value attributes.
Related user issues:
- Adding lists to the metadata #227
- [Feature Request]: add new filter options for the retriever like $contains or $in like in Pinecone for list metadata #936
- [Feature Request]: Metadata Filters: having common tags or not #2487
- [Feature Request]: $contains for metadata or allow type list for metadata and have $in for lists as filter option #3153
Describe the proposed solution
- Allow storing lists of primitive data types (strings, numbers, booleans) as values in metadata fields during document insertion or updates.
- Provide query operators to efficiently filter documents based on list contents. This includes, at a minimum:
$contains
(or similar): To check if a list field contains a specific value.$in
(or similar): To check if a list field contains any value from a given set.- Potentially other operators like
$all
(contains all values),$size
(matches list size), etc., based on community needs and feasibility.
Alternatives considered
No response
Importance
nice to have
Additional Information
No response