node.jsdatabasemongodbmongooseindexed

Planner return error : : caused by : : No indexed plans available, and running with 'notablescan'


I recently updated MongoDB version 6.0.3. I am using MongoDB driver version 4.5.0. And Mongoose version 6.3.1.

I am trying to do a findOneAndUpdate with upsert and getting an error. Console Error

Also, when I am trying to query something on Atlas, (even something basic and simple), it returns an error. Please help me with what I may be missing. Atlas Error

Tried changing the MongoDB driver version. Could not roll back the MongoDB version after updating to 6.0, so could not try changing that. Tried changing the Mongoose driver version.

The error did not get solved.


Solution

  • Firstly,I want to say, after you upgrade the mongoDB version to 6.x atlas doesn't allow to downgrade.

    No Index plan available

    indicates that you might query the field which doesn't have an index.

    Please check Advance setting

    After this setting i got the same error and once i applied index to that field the error has been resolved.