Hello,
I have a MongoDB database running with docker compose and I’m trying to move over to use Atlas Search.
Previously the configuration in our docker-compose file was:
services:
mongodb:
<<: *networks
container_name: mongodb
image: mongo:8.0
volumes:
- mongodb:/data/db
ports:
- "27017:27017"
After following this guide I changed it to:
mongodb:
<<: *networks
container_name: mongodb
image: mongodb/mongodb-atlas-local:8.0.3
volumes:
- mongodb:/data/db
ports:
- "27017:27017"
When connected in Compass I see no option to interact with Search Indexes.
From MongoDB Node package (v6.10)
When running the following command to create the search index:
await dbName.collection("collection_name").createSearchIndex({
name: "autocomplete",
definition: {
mappings: {
dynamic: false,
fields: {
"attributes.value": {
foldDiacritics: true,
maxGrams: 15,
minGrams: 2,
tokenization: "edgeGram",
type: "autocomplete"
}
}
}
}
});
I get this error:
MongoServerError: Using Atlas Search Database Commands and the $listSearchIndexes aggregation stage requires additional configuration. Please connect to Atlas or an AtlasCLI local deployment to enable. For more information on how to connect, see https://dochub.mongodb.org/core/atlas-cli-deploy-local-reqs.
Any help would be greatly appreciated.
Thanks in advance