Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FEATURE.SET

Last updated
FEATURE.SET group entity feature value [feature value ...]
Group
Feature store
Complexity
O(F) where F is the number of features given
Arity
-5 (at least 5 words, counting the command name)
Flags
write, fast
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.SET writes the given features of entity, creating the entity if needed (its other features keep their current or default values), and records the time of the update.

Each value is read according to the feature’s type in the schema. Make sure int64 and double values are valid numbers: a value that does not parse is stored as 0. Feature names that are not in the schema are ignored.

Case RESP2 RESP3
Values written Simple string OK Same

Errors:

  • ERR group not found if the group does not exist.
  • ERR invalid value for feature 'name' (type) if a value does not fit the feature’s type, for example abc or 1.5 for an int64.
  • ERR unknown feature 'name' for group 'group' if the group’s schema has no such feature.

On any of these errors nothing is written for that call, and the entity is not created.

  • ERR wrong number of arguments for 'feature.set' command if no pair is given or a feature has no value.
  • NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.com if your license does not include the feature-store feature.
127.0.0.1:6379> FEATURE.SET user_features user:42 age 31 ctr 0.042 country DE
OK
127.0.0.1:6379> FEATURE.SET user_features user:42 ctr 0.051
OK

HotKV-only command. Redis and Valkey have no equivalent.

FEATURE.CREATE, FEATURE.GET, FEATURE.BATCH, FEATURE.SCHEMA, FEATURE.STATS, FEATURE.DROP, FEATURE.LIST, AI features guide