Issue a query with a metadata filter object: client.query(vector=[...], filter={'category': {'$eq': 'electronics'}, 'price': {'$lte': 100}}, top_k=20)
For high-cardinality string fields (e.g. user_id), prefer namespace isolation over metadata filtering to avoid full metadata scans
Benchmark recall vs latency trade-off: metadata filtering performs a pre-filter pass before ANN search, so overly selective filters on large indexes reduce recall
Use $in operator for set membership filters instead of multiple $eq OR conditions to reduce query complexity
Known gotchas
Applying metadata filters on fields that are absent from many vectors effectively creates a sparse filter — Pinecone will only match vectors where the field exists
Nested metadata objects are not supported as filter targets; flatten nested structures before upsert
Performance is comparable between namespace isolation and metadata filtering for equivalent data volumes, so choose based on access-pattern flexibility needs
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp