FEATURE.BATCH
FEATURE.BATCH group entity [entity ...] [FEATURES feature [feature ...]]
- Group
- Feature store
- Complexity
- O(E * F) where E is the number of entities and F the features returned
- Arity
- -3 (at least 3 words, counting the command name)
- Flags
- read-only, slow
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- Performance and Scale
- On-Premise
- requires the feature-store license feature
The feature store keeps typed feature values for entities (users, items, sessions) in named feature groups, for low-latency reads at model inference time. FEATURE.BATCH works like FEATURE.GET for several
entities at once. Every argument after group is an entity id until the
FEATURES keyword; the names after it select the features to return for
every entity. Without FEATURES, all features are returned.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Array with one element per entity, in the order given: the same three-element array as FEATURE.GET, or nil (null in RESP3) for an entity that does not exist. For an unknown group every element is nil. |
Same |
Values come back as integers for int64 features, as decimal strings with six digits after the point for double features, and as bulk strings for string features.
Errors:
ERR wrong number of arguments for 'feature.batch' commandif the argument count is wrong.NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.comif your license does not include thefeature-storefeature.
Examples
Section titled “Examples”127.0.0.1:6379> FEATURE.BATCH user_features user:42 user:999 FEATURES ctr1) 1) 1) "ctr" 2) "0.051000" 2) (integer) 1790985600123 3) (integer) 73102) (nil)Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”FEATURE.CREATE, FEATURE.SET, FEATURE.GET, FEATURE.SCHEMA, FEATURE.STATS, FEATURE.DROP, FEATURE.LIST, AI features guide
Was this page helpful?
Thanks for the feedback.