SERVER-139350In Code Review
Search index commands on mongos ignore {ok: 0} replies from the primary shard when resolving the target namespace
In search_index_process_router.cpp, fetchCollectionUUIDAndResolveView and resolveViewHelper only check the transport status of the listCollections and _shardsvrResolveView replies, not the command status. As a result, a failed listCollections surfaces as a "wrong type for field" error instead of the shard's error, and a failed _shardsvrResolveView makes a view look like a missing collection (NamespaceNotFound). We should check both replies with AsyncRequestsSender::Response::getEffectiveStat