feat: Add retrieve_online_documents_v2 support to Qdrant online store
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
## What is missing
- `QdrantOnlineStore` has `retrieve_online_documents` (v1) only — no `retrieve_online_documents_v2`
- `FeatureStore.retrieve_online_documents_v2()` raises `NotImplementedError` for `online_store.type: qdrant`
- v1 ignores `requested_features`; returns a 5-tuple, not `Dict[str, ValueProto]`
- No `query_string` / hybrid path in Feast's Qdrant integration
- `create_collection` configures dense vectors only (no sparse vectors for keyword search)
**File:** `sdk/python/feast/infra/online_stores/qdrant_online_store/qdrant.py`
## What is required (v2 contract)
Implement `retrieve_online_documents_v2` per `OnlineStore` interface:
- **Input:** `requested_features`, `embedding` and/or `query_string`, `top_k`, `distance_metric`, `table`, `config`
- **Output:** `List[(event_ts, EntityKeyProto, Dict[str, ValueProto])]` with requested features + `distance` (+ `text_rank` when text search is used)
Reference: `milvus.py`, `mongodb.py`, `postgres.py`
## What to include
1. **Dense vector search** — `query_points` / Query API; honor `requested_features` in `feature_dict`; map score → `distance`
2. **Multi-feature per hit** — handle Qdrant's one-feature-per-point write model (join/fetch or storage change)
3. **Hybrid / `query_string`** — sparse vector index + write path; encode `query_string` to sparse vector; Query API prefetch (dense + sparse) + fusion (RRF); support embedding-only, text-only, and combined queries
4. **Tests** — unit and/or integration under `sdk/python/tests/`
5. **Docs** — update `docs/reference/alpha-vector-database.md` and `docs/reference/online-stores/qdrant.md`
Contributor guide
Assessment
This issue has not been assessed yet.