Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Future Consideration
Categories Atlas Search
Created by Christian Henry
Created on May 20, 2026

Better handling of reshard command on collections with search indices

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

We have had a few cases where we accidentally ran a reshard on a collection which has search indices. This is called out in the docs, but that requires the person running the reshard commands to have read that specific part of the documentation and have internalized that knowledge.


The experience when we did this was:

  • the search index is deleted

  • it is not automatically rebuilt after the collection has finished resharding

  • calls from our application silently succeed with 0 docs return

What would you like to see happen?

Describe the desired outcome or enhancement.

The ideal situation is that reshard in some way just handles this situation, such that the search index exists at the end of the operation.

I understand that might be technically difficult; for us, even just a force (or similar) parameter on reshard which blocks the call unless this parameter is supplied would go a long way as a way for the API to teach users what happens when they hit this case.

It would also be great for the driver to error and not return silently if a search index does not exist.

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

We've had a few incidents where we accidentally ran this. In the recent one, the search index was gone for 2 days without us realizing; this page on our dashboard was silently returning zero results on this cluster.

What steps, if any, are you taking today to manage this problem?

  • we intend to never reshard collections with search indices (we would like to, but we can leave the balancer to handle those)

  • we have made a migration wrapper which encodes this. however, the recent issue was when we resharded via mongosh, which bypassed this custom check

  • we plan to make a search call wrapper which will error if the index does not exist, so we are notified appropriately

  • we may in some way try to customize our mongosh CLI to disallow this at that level


  • Mohummad saqib
    May 23, 2026

    nil

  • Mohummad saqib
    May 23, 2026

    nl

  • Mohummad saqib
    May 23, 2026

    Cool