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.GET

Last updated
FEATURE.GET group entity [feature ...]
Group
Feature store
Complexity
O(F) where F is the number of features returned
Arity
-3 (at least 3 words, counting the command name)
Flags
read-only, 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.GET returns the features of entity: all of them in schema order, or only the ones you name, in the order you name them. Names that are not in the schema are skipped.

Case RESP2 RESP3
Entity found Array of three elements: an array of alternating feature names and values, the last update time in Unix milliseconds (integer), and the age of the data in milliseconds (integer) Same
No such entity or group Nil bulk string Null

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.get' command if the argument count is wrong.
  • 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.GET user_features user:42
1) 1) "age"
2) (integer) 31
3) "ctr"
4) "0.051000"
5) "country"
6) "DE"
2) (integer) 1790985600123
3) (integer) 5012
127.0.0.1:6379> FEATURE.GET user_features user:42 ctr
1) 1) "ctr"
2) "0.051000"
2) (integer) 1790985600123
3) (integer) 5020
127.0.0.1:6379> FEATURE.GET user_features user:999
(nil)

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

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