-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.5.7
-
Component/s: None
-
None
-
Mongosh
In the mongosh the full answer of the server is reported on the shell after the execution of each command. I believe this it too verbose and it includes information that are not needed in most of the cases and just confuse our users and make the overall exeprience worst.
For instance, after executing a dropIndex command this is what do we get on the shell:
$ db.ts.runCommand({dropIndexes: 'ts', index: 'meta2'})
{
nIndexesWas: 2,
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1757340000, i: 1 }),
signature: {
hash: Binary.createFromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAA=', 0),
keyId: Long('0')
}
},
operationTime: Timestamp({ t: 1757340000, i: 1 })
}
I believe that when the response is positive e.g. contains ok: 1 we can avoid reporting $clusterTime and operationTime.
So the result would be instead:
$ db.ts.runCommand({dropIndexes: 'ts', index: 'meta2'})
{
nIndexesWas: 2,
}
If we want to keep the operationTime then I would suggest to use a more human readable format:
$ db.ts.runCommand({dropIndexes: 'ts', index: 'meta2'})
{
nIndexesWas: 2,
operationTime: Timesstamp("2025-09-08 14:00:00 UTC");
}