Skip to content

feat: Add retrieve_online_documents_v2 support to Redis online store #6461

@fcas

Description

@fcas

Is your feature request related to a problem? Please describe.

The Redis online store currently only supports online_read / online_write operations via get_online_features. There is no support for retrieve_online_documents or retrieve_online_documents_v2, which prevents users from performing vector similarity search (ANN) through the Feast SDK when using Redis as their online store.

Redis 8 introduced Vector Sets as a native data structure (via the VSIM command), making it a first-class vector store without requiring additional modules like RedisSearch. Despite this, Feast users are forced to bypass the SDK and call Redis directly for ANN queries, losing the abstraction and consistency that Feast provides.

Describe the solution you'd like

Implement retrieve_online_documents_v2 in the Redis online store (sdk/python/feast/infra/online_stores/redis.py) with support for:

  • Vector similarity search using Redis 8 native Vector Sets (VSIM command)
  • COSINE and L2 distance metrics
  • top_k results
  • Optional metadata/payload filtering by entity key
  • Backward compatibility with older Redis versions (graceful error if Vector Sets unavailable)

Expected usage:

  results = store.retrieve_online_documents(
      feature="user_semantic_memory:perfil_embedding",
      query=query_embedding,  # np.ndarray float32
      top_k=10,
      distance_metric="COSINE",
  )

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions