$range groups documents into custom ranges.
Use it when bucket boundaries are defined by business logic (for example pricing tiers).
Compatibility
Field must be
FAST.
Arguments
from is inclusive. to is exclusive.
- TypeScript
- Python
- Redis CLI
Output
fromAsString / toAsString and nested sub-aggregation outputs.