Defines a filter for document metadata. All top-level key-value pairs are implicitly ANDed. The value for a field can be a direct scalar match (implicit equality) or a MetadataFieldCondition object for more complex comparisons.
MetadataFieldCondition
const filter: MetadataFilter = {category: "technology", // Implicit $eqyear: { $gte: 2023 },tags: { $all: ["typescript", "AI"] },isPublished: true}; Copy
const filter: MetadataFilter = {category: "technology", // Implicit $eqyear: { $gte: 2023 },tags: { $all: ["typescript", "AI"] },isPublished: true};
Defines a filter for document metadata. All top-level key-value pairs are implicitly ANDed. The value for a field can be a direct scalar match (implicit equality) or a
MetadataFieldConditionobject for more complex comparisons.