$eq operator performs explicit equality matching on a field.
While you can often omit $eq and pass values directly (e.g., { price: 199.99 }),
using $eq explicitly makes your intent clear and is required when combining with other operators.
For text fields, $eq performs a term search for single words.
For multi-word values, it behaves like a phrase query, requiring the words to appear adjacent and in order.
For numeric fields, it matches the exact value.
For boolean fields, it matches true or false.
For date fields, it matches the exact timestamp.
Compatibility
| Field Type | Supported |
|---|---|
| TEXT | Yes |
| U64/I64/F64 | Yes |
| DATE | Yes |
| BOOL | Yes |
Examples
- TypeScript
- Redis CLI