Can a local mongodb instance be used when working with langchain MongoDBAtlasVectorSearch?

I know the docs are all about using an Atlas cluster, but, just checking whether that’s actually a technical requirement. Can this be used with a local instance instead, or, do I have to have an atlas instance? TIA

Yes it is a requirement. Vector Search is only supported on Atlas Clusters.

That said, if you have a requirement for a Local Development solution you can use our Atlas CLI to deploy something locally, but this is exclusively for development and testing purposes.

Thanks for the prompt reply.

So, following along with the docs here: https://mongodb.prakticum-team.ru/docs/atlas/cli/stable/atlas-cli-deploy-docker/ with docker-compose, I’m not able to persist anything between runs. I tried adding another volume that maps the db data in a typical mongo container, but that doesn’t work here. Now, I can easily accomplish this with mongosh and scripts, but, in a docker compose environment, I have other services which are dependent on mongo, and this isn’t working. What’s the solution for persisting, if there is one? Or failing that, a work around suggestion?

And if you want to service which depends on other service , you could use the depends on creiteria , but as of my knowledge , it only influnces the order in which your containers are started but it doesn’t mean than your second image is started after the completion of mongo , but i’m sure that the persisting will work

mongo:
image: mongo
ports:
- “27017:27017”
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: root
volumes:
- ./your_chache_dir:/data/db