Metadata filter limit: 10,000 values per $in/$nin operator
Pinecone now enforces a limit of 10,000 values per $in or $nin operator in metadata filter expressions. This limit helps ensure consistent query performance and protects shared infrastructure from excessive load caused by very large filters.
Requests that exceed this limit will fail with a 400 - BAD_REQUEST error.
If your application currently uses large $in filters (especially for access control), consider these approaches:
- Namespace-based isolation (recommended): Create separate namespaces for each tenant instead of filtering by thousands of tenant IDs. This can also reduce query costs (queries on a 1 GB namespace cost 1 RU instead of 100 RUs for a 100 GB namespace with filtering).
- Access control groups: Filter by organization, project, or role identifiers instead of individual user IDs.
- Post-filter client-side: Retrieve a larger top K without filtering, then filter results in your application.
For more information, see Metadata filter limits and Design for multitenancy.