$mul
Reference group: Update operator families
What it does
Multiplies existing numeric fields by a factor.
Syntax
{$mul: { field: factor }}
Use case
Controlled scaling.
$mul: practical example
db.metrics.updateMany({}, { $mul: { score: 1.1 } })💡 Explanation
Multiplies existing numeric fields by a factor.
When to use it
Controlled scaling.
Key Takeaways
- Multiplies existing numeric fields by a factor.
- Typical use: Controlled scaling.