Mongo Atlas Search index in Docker

1k Views Asked by At

I already have a Docker Mongo image in my NodeJs service. I implement the acceptance test using the Docker Mongo image. But now, I start to use Atlas Search as well and I want to create Atlas Search index on my Mongo Docker. I did search on the documentation but couldn't find a way. Do you have any idea how can I create an index for my local environment with docker? Otherwise I get this error caused by MongoServerError: Unrecognized pipeline stage name: '$search'

2

There are 2 best solutions below

0
On

You have to use Atlas cli to connect to a test database and run your queries to atlas.

Take a look to this guide:

https://www.mongodb.com/developer/products/mongodb/local-development-mongodb-atlas-cli-docker/

0
On

Looks like Atlas CLI is the only option at this time. Please see from MongoDB's page, Create a Local Atlas Deployment

Looks like there is also a Docker image for the CLI as well if you choose.