Interface: Filter
Defined in: retrieval/src/query.ts:80
MongoDB-style filter expression.
Example
// Equality
{ status: "active" }
// Comparison
{ views: { $gt: 1000 } }
// Set membership
{ tags: { $in: ["ai", "ml"] } }
// Logical AND (implicit)
{ status: "active", views: { $gte: 100 } }
// Logical AND (explicit)
{ $and: [{ status: "active" }, { views: { $gte: 100 } }] }
// Logical OR
{ $or: [{ status: "draft" }, { status: "review" }] }Extends
Indexable
[field: string]:
| ScalarValue
| FieldOps
| Filter
| Filter[]
| undefinedProperties
| Property | Type | Inherited from | Defined in |
|---|---|---|---|
$and? | Filter[] | LogicalOps.$and | retrieval/src/query.ts:51 |
$not? | Filter | LogicalOps.$not | retrieval/src/query.ts:53 |
$or? | Filter[] | LogicalOps.$or | retrieval/src/query.ts:52 |