GeezerVison is showing github.com — docs: note composite vector index as future optimization · feast-dev/feast@beaa3e9
File tree
Expand file treeCollapse file tree
Open diff view settings
sdk/python/feast/infra/online_stores/mongodb_online_store
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: sdk/python/feast/infra/online_stores/mongodb_online_store/mongodb.py +9-1Lines changed: 9 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -501,7 +501,15 @@ def _ensure_vector_indexes( |
501 | 501 | tables: Sequence[Union[BatchFeatureView, StreamFeatureView, FeatureView]], |
502 | 502 | online_config: MongoDBOnlineStoreConfig, |
503 | 503 | ) -> None: |
504 | | - """Create Atlas vector search indexes for vector-indexed fields if they don't exist.""" |
| 504 | + """Create Atlas vector search indexes for vector-indexed fields if they don't exist. |
| 505 | +
|
| 506 | + Currently creates one index per (feature_view, vector_field) pair. |
| 507 | + A future optimization could consolidate all vector fields into a |
| 508 | + single composite index with multiple field definitions, reducing |
| 509 | + cluster-wide index count and memory overhead. See Atlas limits: |
| 510 | + hard cap of 2,500 search indexes per cluster; smaller tiers (M10) |
| 511 | + may degrade well before that. |
| 512 | + """ |
505 | 513 | db = collection.database |
506 | 514 | if collection.name not in db.list_collection_names(): |
507 | 515 | db.create_collection(collection.name) |
|