Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/alpha-vector-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Below are supported vector databases and implemented features:
| Milvus | [x] | [x] | [x] | [x] |
| Faiss | [ ] | [ ] | [] | [] |
| SQLite | [x] | [ ] | [x] | [x] |
| Qdrant | [x] | [x] | [] | [] |
| Qdrant | [x] | [x] | [x] | [x] |

*Note: V2 Support means the SDK supports retrieval of features along with vector embeddings from vector similarity search.

Expand All @@ -30,7 +30,7 @@ Beyond that, we will then have `retrieve_online_documents` and `retrieve_online_
backwards compatibility and the adopt industry standard naming conventions.
{% endhint %}

**Note**: Milvus and SQLite implement the v2 `retrieve_online_documents_v2` method in the SDK. This will be the longer-term solution so that Data Scientists can easily enable vector similarity search by just flipping a flag.
**Note**: Milvus, SQLite, PostgreSQL, Elasticsearch, MongoDB, and Qdrant implement the v2 `retrieve_online_documents_v2` method in the SDK. This will be the longer-term solution so that Data Scientists can easily enable vector similarity search by just flipping a flag.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note at line 33 was updated to include Qdrant, but the table at line 17 still shows [] for V2 Support. Need to update the table row to [x] for V2 Support (and Online Read).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, Thanks for Pointing out


## Examples

Expand Down
59 changes: 58 additions & 1 deletion docs/reference/online-stores/qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,67 @@ The full set of configuration options is available in [QdrantOnlineStoreConfig](
| collocated by feature view | yes |
| collocated by feature service | no |
| collocated by entity key | no |
| retrieve_online_documents_v2 (vector search) | yes |
| hybrid text search (`query_string`) | yes (opt-in) |

To compare this set of functionality against other online stores, please see the full [functionality matrix](overview.md#functionality-matrix).

## Retrieving online document vectors
## Vector search with retrieve_online_documents_v2

Qdrant stores one point per feature. `retrieve_online_documents_v2` runs dense vector search on the embedding feature, then joins sibling feature points by `entity_key` so the response includes every requested feature in a single `Dict[str, ValueProto]`.

{% code title="python" %}

```python
from feast import FeatureStore

store = FeatureStore(repo_path="feature_store.yaml")

results = store.retrieve_online_documents_v2(
features=["documents:embedding", "documents:text_field"],
query=[0.1, 0.2, 0.3], # embedding vector
top_k=5,
)
```

{% endcode %}

## Opt-in hybrid search

Hybrid keyword + vector search is **disabled by default**. Enable it in `feature_store.yaml`, recreate the collection (`feast teardown` + `feast apply`), and install `fastembed` so the Qdrant client can encode sparse vectors at upload time (via `models.Document`):

{% code title="feature_store.yaml" %}

```yaml
online_store:
type: qdrant
host: localhost
port: 6333
vector_enabled: true
text_search_enabled: true
sparse_vector_name: sparse
sparse_embedding_model: Qdrant/bm25
text_feature: text_field # optional; defaults to first STRING feature
```

{% endcode %}

{% code title="python" %}

```python
results = store.retrieve_online_documents_v2(
features=["documents:embedding", "documents:text_field"],
query=[0.1, 0.2, 0.3],
query_string="searchable keywords",
top_k=5,
)
```

{% endcode %}

Hybrid queries use Qdrant's Query API with reciprocal rank fusion (RRF) over dense and sparse vectors.

## Retrieving online document vectors (v1)

The Qdrant online store supports retrieving document vectors for a given list of entity keys. The document vectors are returned as a dictionary where the key is the entity key and the value is the document vector. The document vector is a dense vector of floats.

Expand Down
Loading
Loading