Hi,
I have created a M0 cluster in Mongo Atlas. Im running atlas search on a collection I have created. I would like to run explain plan for the search query to know the time taken to execute. db.collection.explain().aggregate() is working without any error. But when running
db.collection.explain(“executionStats”).aggregate(), there is a error as below
“ok” : 0,
“errmsg” : “(Unauthorized) not authorized on demoecommerce to execute command { aggregate: “inventory”, pipeline: [[{$search [{index inv_idx} {text [{query JBL} {path productName}]}]}] [{$project [{_id 0} {productName 1}]}]], cursor: { } }”,
“code” : 8000,
“codeName” : “AtlasError”
Please let me know how can I run explain plan for atlas search or if there is any other option to get the time take for execution in atlas search.
I escalated this conversation to the Atlas team. I’m waiting for an answer at the moment.
That being said - there is probably a reason for this operation to not be supported on shared environment and I don’t have this issue with an M10 cluster.
Hi Durga_Krishnamoorthi,
I’m a product manager at MongoDB and work with the team that built and maintains a large part of the M0/2/5 stack. I’ve verified that the explain() behavior you reported above is a bug and we now have it in our list to fix. Very much appreciate you taking the time to ask and provide details around the issue as it really helps us ensure you have the best experience possible!