feat: Add retrieve_online_documents_v2 support to Redis online store
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
**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:
```python
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**
- PostgreSQL + pgvector: Supports retrieve_online_documents_v2 natively but has higher latency and lower throughput compared to Redis for online serving.
- Milvus: Full support via PR #4971, but adds significant operational overhead.
- Direct Redis calls (current workaround): Bypasses the Feast SDK entirely, losing feature logging, consistency guarantees, and SDK abstractions.
**Additional context**
- Redis 8 Vector Sets docs: https://redis.io/blog/announcing-vector-sets-a-new-redis-data-type-for-vector-similarity
- Existing retrieve_online_documents_v2 implementations that can serve as reference: milvus.py, mongodb.py, postgres.py
- Related issue: #6445 (Qdrant support)
- Redis 8 is GA and widely adopted in production environments, making this a high-impact addition for the Feast community.
Contributor guide
Assessment
This issue has not been assessed yet.