Available in: Redis Stack
Time complexity: O(n) where n is the number of time-series that match the filters
Get all time series keys matching a filter list.
TS.QUERYINDEX filter...
filter...
This is the list of possible filters:
=
value - label equals value!=
value - label doesn't equal value=
- key does not have the label label!=
- key has label label=(
value1,
value2,
...)
- key with label label that equals one of the values in the list!=(
value1,
value2,
...)
- key with label label that doesn't equal any of the values in the listNote: Whenever filters need to be provided, a minimum of one label=
value filter must be applied.
Note: QUERYINDEX command can't be part of transaction when running on Redis cluster.
127.0.0.1:6379> TS.QUERYINDEX sensor_id=2
1) "temperature:2:32"
2) "temperature:2:33"