Skip to content

Commit f8389fb

Browse files
authored
fix: Fixed formatting and image for mongo blog (#6377)
Signed-off-by: ntkathole <[email protected]>
1 parent 57d28d4 commit f8389fb

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

‎infra/website/docs/blog/mongodb-feast-integration.md‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
title: "Native MongoDB Support in Feast: One Database for Operational Data, Features, and Vectors"
3-
description: Feast now ships first-class support for **MongoDB** as both an online and an offline store, plus native **Vector Search** for embedding-based retrieval. Machine Learning teams running on MongoDB can serve features at low latency, generate point-in-time-correct training datasets, and power RAG or recommender workloads, all from a single MongoDB Atlas cluster, with no separate cache, no separate warehouse, and no parallel vector database to keep in sync.
3+
description: Feast now ships first-class support for MongoDB as both an online and an offline store, plus native Vector Search for embedding-based retrieval. Machine Learning teams running on MongoDB can serve features at low latency, generate point-in-time-correct training datasets, and power RAG or recommender workloads, all from a single MongoDB Atlas cluster, with no separate cache, no separate warehouse, and no parallel vector database to keep in sync.
44
date: 2026-05-07
55
authors: ["Rishabh Bisht"]
66
---
77

88

99
<div class="hero-image">
10-
<img src="/images/blog/mongodb-feature-stores.png" alt="MongoDB Feast Stores" loading="lazy>
10+
<img src="/images/blog/mongodb-feature-stores.png" alt="MongoDB Feast Stores" loading="lazy" />
1111
</div>
1212

1313

14-
## **The three-database problem in production ML**
14+
## The three-database problem in production ML
1515

1616
A typical Feast deployment runs three different databases:
1717

@@ -23,41 +23,41 @@ That's three sets of credentials, three security postures, three monitoring stac
2323

2424
For teams whose operational data already lives in MongoDB, this was especially painful. Until now, Feast had no native MongoDB option so teams either stood up parallel infrastructure they didn't want, or settled for community plugins of varying maturity.
2525

26-
With this release, both types of the feature store run on MongoDB \- same connection string, same auth, same backups, same observability. The features sit next to the operational data they were derived from.
26+
With this release, both types of the feature store run on MongoDB - same connection string, same auth, same backups, same observability. The features sit next to the operational data they were derived from.
2727

28-
## **What's in the integration**
28+
## What's in the integration
2929

3030
Three components ship together as generally available:
3131

32-
### **1\. MongoDBOnlineStore \- low-latency feature serving**
32+
### 1. MongoDBOnlineStore - low-latency feature serving
3333

3434
Available in Feast `v0.61.0` and above. Built on the official PyMongo driver, with both sync and native async paths (the async implementation uses PyMongo's `AsyncMongoClient`). It supports `online_write_batch`, `online_read`, and their async equivalents.
3535

3636
Features from multiple feature views for the same entity are colocated in a single MongoDB collection keyed by the serialized entity key, so a read for an entity is a single primary-key lookup, not a fan-out across collections.
3737

38-
### **2\. MongoDBOfflineStore \- historical retrieval and training-set generation**
38+
### 2. MongoDBOfflineStore - historical retrieval and training-set generation
3939

4040
Available in `v0.63.0` and above. Uses the MongoDB aggregation framework for retrieval, with `pandas.merge_asof` for the point-in-time join when entities repeat across timestamps. Ships with `MongoDBSource` (the `DataSource` class), `offline_write_batch` for ingest, and `persist` to write joined results to Parquet for downstream training pipelines.
4141

42-
### **3\. MongoDB Vector Search \- embeddings as first-class features**
42+
### 3. MongoDB Vector Search - embeddings as first-class features
4343

44-
When you set `vector_enabled: true` on the online store, Feast automatically creates and manages MongoDB vector search indexes on any `FeatureView` field marked with `vector_index=True`. The `retrieve_online_documents_v2()` method runs a `$vectorSearch` aggregation under the hood and returns nearest-neighbor results as `(event_ts, entity_key, feature_dict)` tuples with a similarity score \- with `top_k` limiting and configurable distance metrics (`cosine`, `dot product`, `euclidean`).
44+
When you set `vector_enabled: true` on the online store, Feast automatically creates and manages MongoDB vector search indexes on any `FeatureView` field marked with `vector_index=True`. The `retrieve_online_documents_v2()` method runs a `$vectorSearch` aggregation under the hood and returns nearest-neighbor results as `(event_ts, entity_key, feature_dict)` tuples with a similarity score - with `top_k` limiting and configurable distance metrics (`cosine`, `dot product`, `euclidean`).
4545

46-
The result: a team running RAG, recommenders, or agent workloads can store, serve, and similarity-search feature embeddings in the same Atlas cluster as their other features with no separate vector database to bolt on.
46+
The result: a team running RAG, recommenders, or agent workloads can store, serve, and similarity-search feature embeddings in the same Atlas cluster as their other features — with no separate vector database to bolt on.
4747

4848
## **Quick start**
4949

50-
### **Install**
50+
### Install
5151

5252
```shell
5353
pip install 'feast[mongodb]'
5454
```
5555

56-
### **Configure your `feature_store.yaml`**
56+
### Configure your `feature_store.yaml`
5757

5858
Point both the online and offline store at the same Atlas cluster. No separate Atlas feature flag or opt-in required.
5959

60-
```
60+
```yaml
6161
project: my_feature_repo
6262
registry: data/registry.db
6363
provider: local
@@ -75,7 +75,7 @@ offline_store:
7575
entity_key_serialization_version: 3
7676
```
7777
78-
### **Define a feature view backed by `MongoDBSource`**
78+
### Define a feature view backed by `MongoDBSource`
7979

8080
```py
8181
from datetime import timedelta
@@ -109,7 +109,7 @@ driver_stats_fv = FeatureView(
109109
)
110110
```
111111

112-
### **Apply, materialize, and serve**
112+
### Apply, materialize, and serve
113113

114114
```shell
115115
feast apply
@@ -131,13 +131,13 @@ features = store.get_online_features(
131131
).to_dict()
132132
```
133133

134-
That's it. Same connection string, same auth model, same cluster \- features in, features out.
134+
That's it. Same connection string, same auth model, same cluster - features in, features out.
135135

136-
## **RAG and embeddings: vector search in the same cluster**
136+
## RAG and embeddings: vector search in the same cluster
137137

138138
If you're building a RAG pipeline, a recommender, or an agent that needs nearest-neighbor lookup over feature embeddings, the online store doubles as a vector store when `vector_enabled` is set:
139139

140-
```
140+
```yaml
141141
online_store:
142142
type: mongodb
143143
connection_string: "mongodb+srv://<user>:<password>@<cluster>.mongodb.net"
@@ -188,9 +188,9 @@ results = store.retrieve_online_documents_v2(
188188
).to_df()
189189
```
190190

191-
Under the hood, this becomes a `$vectorSearch` aggregation against your Atlas cluster \- no second system to provision, no vector data to keep in sync with the rest of your features.
191+
Under the hood, this becomes a `$vectorSearch` aggregation against your Atlas cluster - no second system to provision, no vector data to keep in sync with the rest of your features.
192192

193-
## **Why this matters**
193+
## Why this matters
194194

195195
A few reasons we think this lands in the right place for ML teams already on MongoDB:
196196

@@ -200,11 +200,11 @@ A few reasons we think this lands in the right place for ML teams already on Mon
200200
* **Flexible schema where it helps.** Feature engineering is iterative. MongoDB's document model means adding a field to a feature view doesn't require a schema migration on day one.
201201
* **Async serving when you need it.** The online store ships a native async path on `AsyncMongoClient`, so feature lookups don't block the rest of your serving stack.
202202

203-
## **Where to next**
203+
## Where to next
204204

205-
* **Online store reference:** [Feast docs \- MongoDB online store](https://docs.feast.dev/master/reference/online-stores/mongodb)
206-
* **Offline store reference:** [Feast docs \- MongoDB offline store](https://docs.feast.dev/master/reference/offline-stores/mongodb)
207-
* **Vector search:** [Feast docs \- Vector Search](https://docs.feast.dev/master/reference/data-sources/mongodb#vector-search)
208-
* **Tutorial:** [Integrate MongoDB with Feast](https://www.mongodb.com/docs/atlas/ai-integrations/feast/)
205+
* **Online store reference:** [Feast docs - MongoDB online store](https://docs.feast.dev/master/reference/online-stores/mongodb)
206+
* **Offline store reference:** [Feast docs - MongoDB offline store](https://docs.feast.dev/master/reference/offline-stores/mongodb)
207+
* **Vector search:** [Feast docs - Vector Search](https://docs.feast.dev/master/reference/data-sources/mongodb#vector-search)
208+
* **Tutorial:** [Integrate MongoDB with Feast](https://www.mongodb.com/docs/atlas/ai-integrations/feast/)
209209

210-
If you're already on MongoDB and want to standardize your ML stack on a single backend, this is the time to try it. Spin up a feature repo, point both stores at your cluster, and let us know how it goes \- issues and PRs welcome on GitHub.
210+
If you're already on MongoDB and want to standardize your ML stack on a single backend, this is the time to try it. Spin up a feature repo, point both stores at your cluster, and let us know how it goes - issues and PRs welcome on GitHub.

0 commit comments

Comments
 (0)