Skip to main content

MongoDB

MongoDB is a versatile document database that supports vector search capabilities, allowing for efficient high-dimensional similarity searches over large datasets with robust scalability and performance.

Usage

Config

Here are the parameters available for configuring MongoDB:
Note: If mongo_uri (Python) or url (TypeScript) is not provided, it defaults to mongodb://localhost:27017. A local instance must be running MongoDB v8.2+ for vector search to work.
Note: The vector search index builds asynchronously after the first write. A search issued right after the first add() may return no results (and log an “index not initialized” message) until the index finishes building. This takes a few seconds on a local deployment and up to about a minute on Atlas. This is expected; the search returns results once the index is ready.