Type alias MetadataFilter

MetadataFilter: {
    [key: string]: MetadataScalarValue | MetadataFieldCondition;
}

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.

Type declaration

Example

const filter: MetadataFilter = {
category: "technology", // Implicit $eq
year: { $gte: 2023 },
tags: { $all: ["typescript", "AI"] },
isPublished: true
};